mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
fix broken button stories
This commit is contained in:
@@ -41,9 +41,10 @@ const Spacing = styled.div`
|
||||
`;
|
||||
|
||||
const SpacingDecorator = (story: () => ReactNode) => <Spacing>{story()}</Spacing>;
|
||||
const RoutingDecorator = (story: () => ReactNode) => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>;
|
||||
|
||||
storiesOf("Buttons|Button", module)
|
||||
.addDecorator(story => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>)
|
||||
.addDecorator(RoutingDecorator)
|
||||
.add("Colors", () => (
|
||||
<div>
|
||||
{colors.map(color => (
|
||||
@@ -72,6 +73,7 @@ storiesOf("Buttons|Button", module)
|
||||
|
||||
const buttonStory = (name: string, storyFn: () => ReactElement) => {
|
||||
return storiesOf("Buttons|" + name, module)
|
||||
.addDecorator(RoutingDecorator)
|
||||
.addDecorator(SpacingDecorator)
|
||||
.add("Default", storyFn);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user