implemented popover for annotate

This commit is contained in:
Sebastian Sdorra
2020-06-12 11:29:23 +02:00
parent 9c5e0c64fd
commit 24444aa065
5 changed files with 110 additions and 14 deletions

View File

@@ -26,6 +26,8 @@ import { storiesOf } from "@storybook/react";
import * as React from "react";
import styled from "styled-components";
import Annotate, { AnnotatedSource } from "./Annotate";
import { MemoryRouter } from "react-router-dom";
import repository from "./__resources__/repository";
const Wrapper = styled.div`
margin: 2rem;
@@ -108,5 +110,6 @@ const source: AnnotatedSource = {
};
storiesOf("Annotate", module)
.addDecorator(storyFn => <Wrapper className="box box-link-shadow">{storyFn()}</Wrapper>)
.add("Default", () => <Annotate source={source} />);
.addDecorator(storyFn => <MemoryRouter initialEntries={["/"]}>{storyFn()}</MemoryRouter>)
.addDecorator(storyFn => <Wrapper className="box">{storyFn()}</Wrapper>)
.add("Default", () => <Annotate source={source} repository={repository} />);