Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: migrated from storiesOf to CSF
- Loading branch information
Showing
13 changed files
with
767 additions
and
741 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 23 additions & 18 deletions
41
packages/ui-core/src/components/Button/Button.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
|
||
import './Button.css'; | ||
import Button from './Button'; | ||
|
||
storiesOf('Button', module) | ||
.add('default', () => <Button onClick={console.log}>Click me!</Button>) | ||
.add('link', () => ( | ||
<Button type="link" onClick={console.log}> | ||
<div>Click me!</div> | ||
</Button> | ||
)) | ||
.add('disabled button', () => ( | ||
<Button disabled={true} onClick={console.log}> | ||
Click me! | ||
</Button> | ||
)) | ||
.add('disabled link', () => ( | ||
<Button type="link" disabled={true} onClick={console.log}> | ||
Click me! | ||
</Button> | ||
)); | ||
export default { | ||
title: 'Button', | ||
}; | ||
|
||
export const basic = () => <Button onClick={console.log}>Click me!</Button>; | ||
|
||
export const link = () => ( | ||
<Button type="link" onClick={console.log}> | ||
<div>Click me!</div> | ||
</Button> | ||
); | ||
|
||
export const disabledButton = () => ( | ||
<Button disabled={true} onClick={console.log}> | ||
Click me! | ||
</Button> | ||
); | ||
|
||
export const disabledLink = () => ( | ||
<Button type="link" disabled={true} onClick={console.log}> | ||
Click me! | ||
</Button> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
packages/ui-core/src/components/Container/Container.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
|
||
import './Container.css'; | ||
import Container from './Container'; | ||
|
||
storiesOf('Container', module).add('default', () => ( | ||
export default { | ||
title: 'Container', | ||
}; | ||
|
||
export const basic = () => ( | ||
<Container> | ||
Vero ipsa ut maxime aspernatur. Officia quibusdam voluptatum voluptatem dolorem provident dolores minus. Ut soluta | ||
facere consectetur. | ||
</Container> | ||
)); | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,44 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
|
||
import './Grid.css'; | ||
import Grid from './Grid'; | ||
|
||
storiesOf('Grid', module) | ||
.add('default', () => ( | ||
<div> | ||
<Grid className="test" columns={1} columnsSM={2} columnsMD={3} columnsLG={4} columnsXL={5}> | ||
<article>Article One</article> | ||
<article>Article Two</article> | ||
<article>Article Three</article> | ||
<article>Article Four</article> | ||
<article>Article Five</article> | ||
</Grid> | ||
</div> | ||
)) | ||
.add('array', () => ( | ||
<div> | ||
<Grid columns={[2, 5]}> | ||
<article>Article One</article> | ||
<article>Article Two</article> | ||
<article>Article Three</article> | ||
<article>Article Four</article> | ||
<article>Article Five</article> | ||
</Grid> | ||
</div> | ||
)) | ||
.add('override', () => ( | ||
<div> | ||
<Grid columns={[1, 2, 2, 2, 1]} columnsLG={5}> | ||
<article>Article One</article> | ||
<article>Article Two</article> | ||
<article>Article Three</article> | ||
<article>Article Four</article> | ||
<article>Article Five</article> | ||
</Grid> | ||
</div> | ||
)); | ||
export default { | ||
title: 'Grid', | ||
}; | ||
|
||
export const basic = () => ( | ||
<div> | ||
<Grid className="test" columns={1} columnsSM={2} columnsMD={3} columnsLG={4} columnsXL={5}> | ||
<article>Article One</article> | ||
<article>Article Two</article> | ||
<article>Article Three</article> | ||
<article>Article Four</article> | ||
<article>Article Five</article> | ||
</Grid> | ||
</div> | ||
); | ||
|
||
export const array = () => ( | ||
<div> | ||
<Grid columns={[2, 5]}> | ||
<article>Article One</article> | ||
<article>Article Two</article> | ||
<article>Article Three</article> | ||
<article>Article Four</article> | ||
<article>Article Five</article> | ||
</Grid> | ||
</div> | ||
); | ||
|
||
export const override = () => ( | ||
<div> | ||
<Grid columns={[1, 2, 2, 2, 1]} columnsLG={5}> | ||
<article>Article One</article> | ||
<article>Article Two</article> | ||
<article>Article Three</article> | ||
<article>Article Four</article> | ||
<article>Article Five</article> | ||
</Grid> | ||
</div> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.