0.1.1 β’ Published 11 months ago
@runespoorstack/storybook-utils v0.1.1
Table of Contents
- Table of Contents
- β¨ Features
- π¦Ύ Installation
- βΎοΈ Usage
- π οΈ Contributing
- π Special Thanks
- β€οΈ Support or Donate
β¨ Features
- Generate stories urls based on the provided storybook structure.
π¦Ύ Installation
npm i --save-dev @runespoorstack/storybook-utils
βΎοΈ Usage
generateStoriesUrls
const storybookUrl = 'https://storybook.example.com';
const storybookStructure = [
{ title: 'Components/Button', variants: ['Default', 'Primary', 'Secondary'] },
{ title: 'Components/Modal', variants: ['Basic', 'Large', 'Small'] }
];
const storiesUrls = generateStoriesUrls(storybookUrl, storybookStructure);
console.log(storiesUrls);
// [
// 'https://storybook.example.com/index.html?path=/docs/components-button--default',
// 'https://storybook.example.com/index.html?path=/docs/components-button--primary',
// 'https://storybook.example.com/index.html?path=/docs/components-button--secondary',
// 'https://storybook.example.com/index.html?path=/docs/components-modal--basic',
// 'https://storybook.example.com/index.html?path=/docs/components-modal--large',
// 'https://storybook.example.com/index.html?path=/docs/components-modal--small'
// ]
π οΈ Contributing
See the CONTRIBUTING.md document.
π Special Thanks
- I want to say thank you to the best woman in the world, my wife Diana for her love, daily support, motivation and inspiration.
β€οΈ Support or Donate
If you are enjoying this work and feel extra appreciative, you could buy me a book π or 3 πππ.