1.1.0 • Published 2 years ago

wixds-storybook-utils v1.1.0

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
2 years ago

Wix DS Storybook Utils

Wix DS Storybook Utils is a collection of utility functions that help Wix Design Systems teams maintain its storybook platform..

⚙️ Installation

npm install --save-dev wixds-storybook-utils

🔧 Utilities

hrefTo

If you want to get an URL for a particular story, you may use hrefTo function.

Lets say we want to get a link to this page.

We can see that the hierarchy of this page consists of 4 levels.

<a href={hrefTo({
  root: 'Components',
  category: 'Page',
  subCategory: 'Page',
  story: 'EditableTitle'
})}>

componentStoryLink

Writing descriptions in documentation sometimes requires linking to other component stories. This function returns a Link component with React style syntax and can be used as inline link.

  title: 'List item builders',
  description: `Build custom options layouts with:<br/>
    &emsp;- \`listItemSectionBuilder\` - use to group items into sections by type. See ${componentStoryLink({
      root: 'Components',
      category: 'Form',
      subCategory: 'Dropdownlistitems',
      story: 'ListItemSection'
    })}`
  example: '_listItemBuilders',
}
1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago