@runespoorstack/storybook-utils
v0.1.1
Published
The Runespoor set of Storybook utils.
Downloads
2
Maintainers
Readme
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 📖📖📖.