From 557fa3211de73a98c97e7958a7bb31309d2601ab Mon Sep 17 00:00:00 2001 From: Alina Beck Date: Tue, 17 Dec 2019 13:01:50 +0530 Subject: [PATCH] rearrange button stories --- .../generic/BaseButton/BaseButton.story.js | 73 +++++++++++++------ .../_new/generic/BaseIcon/BaseIcon.story.js | 2 +- 2 files changed, 52 insertions(+), 23 deletions(-) diff --git a/webapp/components/_new/generic/BaseButton/BaseButton.story.js b/webapp/components/_new/generic/BaseButton/BaseButton.story.js index f32c2218b..d0b0b2f1e 100644 --- a/webapp/components/_new/generic/BaseButton/BaseButton.story.js +++ b/webapp/components/_new/generic/BaseButton/BaseButton.story.js @@ -2,33 +2,62 @@ import { storiesOf } from '@storybook/vue' import helpers from '~/storybook/helpers' import BaseButton from './BaseButton.vue' -storiesOf('BaseButton', module) +storiesOf('Generic/BaseButton', module) .addDecorator(helpers.layout) - .add('Default', () => ({ - components: { BaseButton }, - template: 'Click me', - })) - - .add('With Icon', () => ({ - components: { BaseButton }, - template: 'With Icon', - })) - - .add('Icon Only', () => ({ - components: { BaseButton }, - template: '', - })) - - .add('Styles and States', () => ({ + .add('default', () => ({ components: { BaseButton }, template: ` - - Default - Primary - Danger +
+ Click me Disabled Loading - +
+ `, + })) + + .add('icon', () => ({ + components: { BaseButton }, + template: ` +
+ With Text + + + +
+ `, + })) + + .add('primary', () => ({ + components: { BaseButton }, + template: ` +
+ Primary + Disabled + Loading +
+ `, + })) + + .add('danger', () => ({ + components: { BaseButton }, + template: ` +
+ Danger + Disabled + Loading +
+ `, + })) + + .add('circle', () => ({ + components: { BaseButton }, + template: ` +
+ + EN + + +
`, })) diff --git a/webapp/components/_new/generic/BaseIcon/BaseIcon.story.js b/webapp/components/_new/generic/BaseIcon/BaseIcon.story.js index 321ebc0de..5ddfe4ff4 100644 --- a/webapp/components/_new/generic/BaseIcon/BaseIcon.story.js +++ b/webapp/components/_new/generic/BaseIcon/BaseIcon.story.js @@ -29,7 +29,7 @@ const iconStyles = ` font-size: 20px; ` -storiesOf('BaseIcon', module) +storiesOf('Generic/BaseIcon', module) .addDecorator(helpers.layout) .add('pure icon', () => ({