Skip to content

Commit

Permalink
update stories
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuza committed Jul 17, 2020
1 parent 93664cc commit 967c103
Showing 1 changed file with 43 additions and 39 deletions.
82 changes: 43 additions & 39 deletions src/atoms/label/Label.stories.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { storiesOf } from '@storybook/vue'
import { select, text } from '@storybook/addon-knobs'

import generateVueInfoTable from '@utils/helpers/generate-vue-info-table.js'
Expand All @@ -14,43 +13,48 @@ const info = `

const classKnobsConfig = getClassKnobsConfig(selectorsConfig)

storiesOf('Atoms/Label', module)
.addParameters({ info })
.add('Default', () => ({
components: { ALabel },
props: {
classKnobs: {
default: select('BEM Modifier', classKnobsConfig)
},
textKnobs: {
default: text('Text', 'Label')
}
export default {
title: 'Atoms/Label',
component: ALabel,
parameters: { info }
}

export const Default = () => ({
components: { ALabel },
props: {
classKnobs: {
default: select('BEM Modifier', classKnobsConfig)
},
textKnobs: {
default: text('Text', 'Label')
}
},
template: `
<a-label :class="classKnobs">
{{ textKnobs }}
</a-label>
`
})

export const CustomTag = () => ({
components: { ALabel },
props: {
classKnobs: {
default: select('BEM Modifier', classKnobsConfig)
},
template: `
<a-label :class="classKnobs">
{{ textKnobs }}
</a-label>
`
}))
.add('Custom tag', () => ({
components: { ALabel },
props: {
classKnobs: {
default: select('BEM Modifier', classKnobsConfig)
},
textKnobs: {
default: text('Text', 'Custom tag label')
},
tagKnob: {
default: text('Html tag', 'span')
}
textKnobs: {
default: text('Text', 'Custom tag label')
},
template: `
<a-label
:tag="tagKnob"
:class="classKnobs"
>
{{ textKnobs }}
</a-label>
`
}))
tagKnob: {
default: text('Html tag', 'span')
}
},
template: `
<a-label
:tag="tagKnob"
:class="classKnobs"
>
{{ textKnobs }}
</a-label>
`
})

0 comments on commit 967c103

Please sign in to comment.