TAS React Components
Components for React JS applications.
Installation
npm install react-tas-components --save
Storybook
Start storybook
npm run dev
Started on http://localhost:9001/
Develop
Core components path - lib/
,
alias for import inner dependency components - components
For create component story you need create a file index.story.js
in component root dir
Code style for components
See CODESTYLE
Code style for stories
Example:
;;; ; const story = ; story;
createComponentStory
- creates the story object for component
Options:
component
- component for story
Methods:
addWithDoc
- creates the new option in component tab, arguments:- Option name (required)
- Render function (required) - Render component preview, props will generate automatically with component documentation
- Component - if you use not base component
- Options:
defaultProps
- default props for Knobs (Object
)ignoreProps
- list of ignored props for documentation (Array
)
Example component: Example