2021-05-05 11:16:23 +00:00
|
|
|
import { action } from '@storybook/addon-actions';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Components/Label',
|
|
|
|
argTypes: {
|
|
|
|
title: {
|
|
|
|
defaultValue: 'sales',
|
|
|
|
control: {
|
|
|
|
type: 'text',
|
|
|
|
},
|
|
|
|
},
|
2021-05-05 17:23:23 +00:00
|
|
|
colorScheme: {
|
|
|
|
control: {
|
|
|
|
type: 'select',
|
|
|
|
options: ['primary', 'secondary', 'success', 'alert', 'warning'],
|
|
|
|
},
|
|
|
|
},
|
2021-05-05 11:16:23 +00:00
|
|
|
description: {
|
|
|
|
defaultValue: 'label',
|
|
|
|
control: {
|
|
|
|
type: 'text',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
href: {
|
|
|
|
control: {
|
|
|
|
type: 'text',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
bgColor: {
|
|
|
|
defaultValue: '#a83262',
|
|
|
|
control: {
|
|
|
|
type: 'text',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
small: {
|
|
|
|
defaultValue: false,
|
|
|
|
control: {
|
|
|
|
type: 'boolean',
|
|
|
|
},
|
|
|
|
},
|
2021-05-05 17:23:23 +00:00
|
|
|
showClose: {
|
2021-05-05 11:16:23 +00:00
|
|
|
defaultValue: false,
|
|
|
|
control: {
|
|
|
|
type: 'boolean',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
icon: {
|
|
|
|
defaultValue: 'ion-close',
|
|
|
|
control: {
|
|
|
|
type: 'text',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
const Template = (args, { argTypes }) => ({
|
|
|
|
props: Object.keys(argTypes),
|
|
|
|
template: '<woot-label v-bind="$props" @click="onClick"></woot-label>',
|
|
|
|
});
|
|
|
|
|
|
|
|
export const DefaultLabel = Template.bind({});
|
|
|
|
DefaultLabel.args = {
|
|
|
|
onClick: action('clicked'),
|
|
|
|
};
|