-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0305963
commit eed7c78
Showing
28 changed files
with
348 additions
and
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
module.exports = { | ||
"stories": [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(js|jsx|ts|tsx)" | ||
], | ||
"addons": [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials" | ||
] | ||
} | ||
webpackFinal: (config) => { | ||
config.resolve.extensions.push('.svg') | ||
|
||
config.module.rules = config.module.rules.map((data) => { | ||
if (/svg\|/.test(String(data.test))) | ||
data.test = /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani)(\?.*)?$/ | ||
|
||
return data | ||
}) | ||
|
||
config.module.rules.push({ | ||
test: /\.svg$/, | ||
use: [ | ||
{ loader: require.resolve('babel-loader') }, | ||
{ loader: require.resolve('@svgr/webpack') }, | ||
], | ||
}) | ||
|
||
return config | ||
}, | ||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: ['@storybook/addon-links', '@storybook/addon-essentials'], | ||
} |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react' | ||
|
||
import { Story, Meta } from '@storybook/react/types-6-0' | ||
|
||
import Backdrop, { BackdropProps } from '../Backdrop' | ||
|
||
export default { | ||
title: 'Backdrop', | ||
component: Backdrop, | ||
} as Meta | ||
|
||
const Template: Story<BackdropProps> = (args) => <Backdrop {...args} /> | ||
|
||
export const Basic = Template.bind({}) |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react' | ||
|
||
import { Story, Meta } from '@storybook/react/types-6-0' | ||
|
||
import Badge, { BadgeProps } from '../Badge' | ||
|
||
export default { | ||
title: 'Badge', | ||
component: Badge, | ||
} as Meta | ||
|
||
const Template: Story<BadgeProps> = (args) => <Badge {...args} /> | ||
|
||
export const Basic = Template.bind({}) | ||
Basic.args = { | ||
children: 'badge text', | ||
type: 'neutral', | ||
} |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react' | ||
|
||
import { Story, Meta } from '@storybook/react/types-6-0' | ||
|
||
import Button, { ButtonProps } from '../Button' | ||
import HeartIcon from './static/heart.svg' | ||
|
||
export default { | ||
title: 'Button', | ||
component: Button, | ||
} as Meta | ||
|
||
const Template: Story<ButtonProps> = (args) => <Button {...args} /> | ||
|
||
export const Basic = Template.bind({}) | ||
Basic.args = { | ||
children: 'Button', | ||
layout: 'primary', | ||
size: 'regular', | ||
} | ||
|
||
export const WithIcon = Template.bind({}) | ||
WithIcon.args = { | ||
children: 'Icon', | ||
layout: 'primary', | ||
icon: HeartIcon, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react' | ||
|
||
import { Story, Meta } from '@storybook/react/types-6-0' | ||
|
||
import Card, { CardProps } from '../Card' | ||
|
||
export default { | ||
title: 'Card', | ||
component: Card, | ||
} as Meta | ||
|
||
const Template: Story<CardProps> = (args) => <Card {...args} /> | ||
|
||
// TODO: Add composed examples with CardBody | ||
export const Basic = Template.bind({}) | ||
Basic.args = { | ||
children: 'Hello', | ||
} | ||
|
||
export const Colored = Template.bind({}) | ||
Colored.args = { | ||
children: 'Hello', | ||
colored: true, | ||
className: 'bg-red-200', | ||
} |
Oops, something went wrong.