Skip to content

Commit

Permalink
update paragraph stories, reorganize classes, switch to css
Browse files Browse the repository at this point in the history
  • Loading branch information
ofrankowska committed Jun 19, 2020
1 parent 7aecc2c commit 2be2a90
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 35 deletions.
4 changes: 4 additions & 0 deletions src/atoms/paragraph/Paragraph.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.a-paragraph {
@apply mb-4;
@apply text-primary leading-loose;
}
3 changes: 0 additions & 3 deletions src/atoms/paragraph/Paragraph.scss

This file was deleted.

65 changes: 34 additions & 31 deletions src/atoms/paragraph/Paragraph.stories.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
import { storiesOf } from '@storybook/vue'
import { text } from '@storybook/addon-knobs'

import AParagraph from './Paragraph.vue'

const sampleParagraphText = 'Velit proident fugiat pariatur irure sint non ut non. Adipisicing aliqua consectetur nisi aliquip velit. Nisi pariatur est consectetur culpa occaecat enim nulla laborum ex. Consectetur incididunt minim cupidatat ad aliquip. Ea non ipsum ut consequat sit adipisicing eiusmod do. Officia incididunt cillum incididunt aliquip sit labore laboris do cillum commodo occaecat voluptate ea aliqua.'

storiesOf('Atoms/Paragraph', module)
.addParameters({ info: true })
.add('Default', () => ({
components: { AParagraph },
props: {
textKnob: {
default: text('Paragraph text', sampleParagraphText)
}
},
template: `
<a-paragraph>
{{ textKnob }}
</a-paragraph>
`
}))
.add('Custom tag', () => ({
components: { AParagraph },
props: {
textKnob: {
default: text('Paragraph text', sampleParagraphText)
},
tagKnob: {
default: text('Html tag', 'div')
}
export default {
title: 'Atoms/Paragraph',
component: AParagraph
}

export const Default = () => ({
components: { AParagraph },
props: {
textKnob: {
default: text('Paragraph text', sampleParagraphText)
}
},
template: `
<a-paragraph>
{{ textKnob }}
</a-paragraph>
`
})

export const CustomTag = () => ({
components: { AParagraph },
props: {
textKnob: {
default: text('Paragraph text', sampleParagraphText)
},
template: `
<a-paragraph :tag="tagKnob">
{{ textKnob }}
</a-paragraph>
`
}))
tagKnob: {
default: text('Html tag', 'div')
}
},
template: `
<a-paragraph :tag="tagKnob">
{{ textKnob }}
</a-paragraph>
`
})
2 changes: 1 addition & 1 deletion src/atoms/paragraph/Paragraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export default {
}
</script>

<style lang="scss" src="./Paragraph.scss" />
<style lang="css" src="./Paragraph.css" />

0 comments on commit 2be2a90

Please sign in to comment.