@runespoorstack/storybook-utils
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@runespoorstack/storybook-utils

The Runespoor set of Storybook utils.

GitHub License GitHub issues npm downloads

Table of Contents

✨ 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 📖📖📖.

Package Sidebar

Install

npm i @runespoorstack/storybook-utils

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

81.7 kB

Total Files

18

Last publish

Collaborators

  • borisshulyak