From 7a4c0a47a6850491d11a6096bccb00a3570c0871 Mon Sep 17 00:00:00 2001 From: rjwaberski Date: Fri, 22 May 2020 13:03:55 +0200 Subject: [PATCH] #264 update label style, update label stories --- src/atoms/label/Label.html | 1 + src/atoms/label/Label.js | 2 +- src/atoms/label/Label.scss | 4 +++- src/atoms/label/Label.stories.js | 15 +++++++++------ 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/atoms/label/Label.html b/src/atoms/label/Label.html index e6b244148..8588c5d2f 100644 --- a/src/atoms/label/Label.html +++ b/src/atoms/label/Label.html @@ -2,5 +2,6 @@ :is="tag" class="a-label" > + diff --git a/src/atoms/label/Label.js b/src/atoms/label/Label.js index 2576b8fe3..72a211542 100644 --- a/src/atoms/label/Label.js +++ b/src/atoms/label/Label.js @@ -2,7 +2,7 @@ export default { props: { /** - * Label tag + * To use another tag instead of `label` */ tag: { type: String, diff --git a/src/atoms/label/Label.scss b/src/atoms/label/Label.scss index e9fa794e1..e9ea20f15 100644 --- a/src/atoms/label/Label.scss +++ b/src/atoms/label/Label.scss @@ -1,10 +1,11 @@ @import '../../../assets/styles/_globals.scss'; +$label-margin : 0 0 $spacer--extra-small !default; $label-margin--inline: 0 $spacer 0 0 !default; $label-font-size : $font-size-base !default; $label-color : $color-secondary !default; $label-font-family : $font-family-base !default; -$label-font-weight : $font-weight-normal !default; +$label-font-weight : $font-weight-base !default; $label-line-height : $font-line-height !default; $label-transition : none !default; @@ -16,6 +17,7 @@ $label-transition : none !default; font-family: $label-font-family; line-height: $label-line-height; transition: $label-transition; + $margin: $label-margin; &--inline { margin: $label-margin--inline; diff --git a/src/atoms/label/Label.stories.js b/src/atoms/label/Label.stories.js index 5aae0d5fc..1db0cedab 100644 --- a/src/atoms/label/Label.stories.js +++ b/src/atoms/label/Label.stories.js @@ -19,11 +19,11 @@ storiesOf('Atoms/Label', module) .add('Default', () => ({ components: { ALabel }, props: { - classKnobs: { - default: select('BEM Modifier', classKnobsConfig) - }, textKnobs: { default: text('Text', 'Label') + }, + classKnobs: { + default: select('BEM Modifier', classKnobsConfig) } }, template: ` @@ -35,16 +35,19 @@ storiesOf('Atoms/Label', module) .add('Custom tag', () => ({ components: { ALabel }, props: { + textKnobs: { + default: text('Text', 'Custom tag label') + }, classKnobs: { default: select('BEM Modifier', classKnobsConfig) }, - textKnobs: { - default: text('Text', 'Custom tag label') + tagKnobs: { + default: text('Tag', 'span') } }, template: ` {{ textKnobs }}