wixds-storybook-utils
v1.1.0
Published
<img src="./storybook_logo.svg" align="right" alt="storybook logo" width="120" height="178">
Downloads
19
Maintainers
Keywords
Readme
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/>
 - \`listItemSectionBuilder\` - use to group items into sections by type. See ${componentStoryLink({
root: 'Components',
category: 'Form',
subCategory: 'Dropdownlistitems',
story: 'ListItemSection'
})}`
example: '_listItemBuilders',
}