react-doc-hooks
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Library for simple documentation react components

Get started

0) Create project

1) Configure entry point

In App.tsx add component <ReactDocHooks/> and init components by function createStories

Example:

const stories = createStories([
    { name: 'Button', component: ButtonStory, markdownFile: ButtonMD },
    { name: 'Input', component: InputStory, markdownString: InputStoryMarkdown },
]);

export const App = () => (
    <>
        <ReactDocHooks stories={stories} />
    </>
);

2) Add hooks

Just import hooks from library and configure some parameters

Example:

const [stringControl] = useStringControl({
    defaultValue: 'Name',
    name: 'String control',
    rowsCount: 1,
  });
  
return (
      <button>
        {stringControl}
      </button>
  );

... and start project!

Readme

Keywords

none

Package Sidebar

Install

npm i react-doc-hooks

Weekly Downloads

2

Version

0.1.0

License

MIT

Unpacked Size

38.4 kB

Total Files

28

Last publish

Collaborators

  • unique_nik