diff --git a/src/stories/Button.stories.js b/src/stories/Button.stories.js index af6f4e9..8776905 100644 --- a/src/stories/Button.stories.js +++ b/src/stories/Button.stories.js @@ -3,14 +3,14 @@ import MyButton from './Button.vue'; export default { title: 'Example/Button', component: MyButton, - argTypes: { - backgroundColor: { control: 'color' }, - size: { control: { type: 'select', options: ['small', 'medium', 'large'] } }, - }, +// argTypes: { +// backgroundColor: { control: 'color' }, +// size: { control: { type: 'select', options: ['small', 'medium', 'large'] } }, +// }, }; -const Template = (args, { argTypes }) => ({ - props: Object.keys(argTypes), +const Template = (args) => ({ + props: Object.keys(args), components: { MyButton }, template: '', }); @@ -37,3 +37,17 @@ Small.args = { size: 'small', label: 'Button', }; + +export const BlackOutline = Template.bind({}); +BlackOutline.args = { + label: 'Black Outline Button', + outline: true, + outlineColor: 'black', +}; + +export const GreenOutline = Template.bind({}); +GreenOutline.args = { + label: 'Green Outline Button', + outline: true, + outlineColor: 'green', +}; diff --git a/src/stories/Button.vue b/src/stories/Button.vue index 864a263..2ae27a7 100644 --- a/src/stories/Button.vue +++ b/src/stories/Button.vue @@ -27,6 +27,13 @@ export default { backgroundColor: { type: String, }, + outline: { + type: Boolean, + default: false, + }, + outlineColor: { + type: String, + }, }, computed: { @@ -36,11 +43,13 @@ export default { 'storybook-button--primary': this.primary, 'storybook-button--secondary': !this.primary, [`storybook-button--${this.size}`]: true, + 'storybook-button--outline': this.outline, }; }, style() { return { backgroundColor: this.backgroundColor, + borderColor: this.outlineColor, }; }, }, diff --git a/src/stories/button.css b/src/stories/button.css index dc91dc7..f1cbdb1 100644 --- a/src/stories/button.css +++ b/src/stories/button.css @@ -28,3 +28,8 @@ font-size: 16px; padding: 12px 24px; } + +.storybook-button--outline { + border-width: 1px; + border-style: solid; + }