You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2020/08/19 05:47:52 UTC
[incubator-superset] branch master updated: chore: splitting button
stories into separate stories (#10631)
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new d095387 chore: splitting button stories into separate stories (#10631)
d095387 is described below
commit d0953874f2ebe41c8fb4ecbf4412d195afa4732b
Author: Evan Rusackas <ev...@preset.io>
AuthorDate: Tue Aug 18 22:47:27 2020 -0700
chore: splitting button stories into separate stories (#10631)
* splitting button stories into separate stories
* lint
---
.../src/components/Button/button.stories.jsx | 49 ++++++++++++----------
1 file changed, 26 insertions(+), 23 deletions(-)
diff --git a/superset-frontend/src/components/Button/button.stories.jsx b/superset-frontend/src/components/Button/button.stories.jsx
index 52aba21..de8cba6 100644
--- a/superset-frontend/src/components/Button/button.stories.jsx
+++ b/superset-frontend/src/components/Button/button.stories.jsx
@@ -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(
@@ -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>
);