@alfheim/generator-nef-stories
v0.5.1
Published
Yeoman generator for basic NEF component stories for Storybook
Downloads
46
Readme
@alfheim/generator-nef-stories
This package is part of the battery used to create new components for the Nasdaq Experience Framework. This package creates an <ComponentName>.stories.tsx
file, which contains component stories to display in Storybook.
Note: It is recommended that you install and use
generator-nef-component
rather than installing this package directly, unless you need to modify the individual file generators.
By default, a component named Test
created using this generator looks as follows:
import { storiesOf } from "@storybook/react";
import { withKnobs } from "@storybook/addon-knobs/react";
import React from "react";
import marked from "marked";
import TestReadme from "./README.md";
import Test from ".";
const TestStories = storiesOf("Test", module)
.addDecorator(withKnobs)
.addParameters({
info: { text: marked(TestReadme) }
})
.add("basic use", () => <Test />);
export default TestStories;
Getting started
To install, simply run:
yarn add @alfheim/generator-nef-stories --dev
or
npm install @alfheim/generator-nef-stories --dev
Contributing
We'd love to have your helping hand on alfheim
! Go over to our issues section and see if there's anything we're looking for help with OR open up a PR if you have an idea for a way to improve the library.
License
Alfheim
is open source software licensed as MIT.