caprica-Six / react-storybook-npm-package

How to register a simple React component with Storybook and npm -

Home Page:https://caprica-six.github.io/react-storybook-npm-package/?path=/story/custom-button--simple

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to register a simple React component with Storybook and npm

Install

npm i @caprica-six/custom-button

yarn add @caprica-six/custom-button

Usage

import { CustomButton } from '@caprica-six/custom-button'

const MyComponent = () => {
    return (
        <CustomButton>Default</CustomButton>
    )
}

Available Scripts

yarn start

yarn run storybook

Run Storybook

yarn run deploy-storybook -- --out=.out

Deploy storybook to github pages with storybook-deployer If you need to configure the output directory you can supply the out flag.

Publish npm package:

Update package version in package.json or npm version 1.0.0

yarn build

yarn publish --access=public

Keywords

React Storybook

npm version demo site

About

How to register a simple React component with Storybook and npm -

https://caprica-six.github.io/react-storybook-npm-package/?path=/story/custom-button--simple


Languages

Language:JavaScript 75.3%Language:HTML 16.0%Language:CSS 8.7%