Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: splitting button stories into separate stories #10631

Merged
merged 2 commits into from
Aug 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 26 additions & 23 deletions superset-frontend/src/components/Button/button.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,33 @@ const hrefKnob = {
defaultValue: null,
};

export const SupersetButton = () => (
export const ButtonGallery = () => (
<div style={{ padding: '10px', backgroundColor: 'white' }}>
{Object.values(bsSizeKnob.options)
.filter(a => a)
.map(size => (
<div>
<h4>{size}</h4>
{Object.values(bsStyleKnob.options)
.filter(o => o)
.map(style => (
<Button
disabled={boolean('Disabled', false)}
bsStyle={style}
bsSize={size}
onClick={action('clicked')}
style={{ marginRight: 5 }}
>
{style}
</Button>
))}
</div>
))}
</div>
);

export const InteractiveButton = () => (
<div style={{ padding: '10px', backgroundColor: 'white' }}>
<h3>Interactive</h3>
<Button
disabled={boolean('Disabled', false)}
bsStyle={select(
Expand Down Expand Up @@ -139,26 +163,5 @@ export const SupersetButton = () => (
>
{text('Label', 'Button!')}
</Button>
<h3>Gallery</h3>
{Object.values(bsSizeKnob.options)
.filter(a => a)
.map(size => (
<div>
<h4>{size}</h4>
{Object.values(bsStyleKnob.options)
.filter(o => o)
.map(style => (
<Button
disabled={boolean('Disabled', false)}
bsStyle={style}
bsSize={size}
onClick={action('clicked')}
style={{ marginRight: 5 }}
>
{style}
</Button>
))}
</div>
))}
</div>
);