Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

feat(tag): Improve knobs on component - FRONT-492 #334

Merged
merged 8 commits into from
Feb 17, 2020
10 changes: 6 additions & 4 deletions src/ec/packages/ec-component-tag/tag.story.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ storiesOf('Components/Tag', module)
tag(
merge(dataLink, {
tag: {
label: text('Label', 'Link tag'),
path: text('Url', '/example'),
label: text('Label', dataLink.tag.label),
path: text('Url', dataLink.tag.path),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MMhh, but if we are doing this in order to match as much as possible the specs, why we name the knob "url" when the property passed to the template is path? I understand that in any case a bit of ambiguity is in place, considering that both a path and an url can be used, so that's what i would do, we name it: Path (accepts also a full url), what do you think?

},
default_icon_path: defaultSprite,
})
),
{
Expand All @@ -36,7 +37,7 @@ storiesOf('Components/Tag', module)
tag(
merge(dataButton, {
tag: {
label: text('Label', 'Button tag'),
label: text('Label', dataButton.tag.label),
},
})
),
Expand All @@ -50,7 +51,8 @@ storiesOf('Components/Tag', module)
tag(
merge(dataRemovable, {
tag: {
label: text('Label', 'Removable tag'),
label: text('Label', dataRemovable.tag.label),
aria_label: text('Aria label', dataRemovable.tag.aria_label),
},
default_icon_path: defaultSprite,
})
Expand Down