@alfheim/generator-nef-stories

0.5.1 • Public • Published

@alfheim/generator-nef-stories

Travis npm (scoped with tag) GitHub license PRs welcome

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.

Readme

Keywords

Package Sidebar

Install

npm i @alfheim/generator-nef-stories

Weekly Downloads

1

Version

0.5.1

License

MIT

Unpacked Size

8.91 kB

Total Files

6

Last publish

Collaborators

  • haldunanil