File tree Expand file tree Collapse file tree 1 file changed +22
-19
lines changed Expand file tree Collapse file tree 1 file changed +22
-19
lines changed Original file line number Diff line number Diff line change 99
1010# react-c4b-ui
1111
12- ![ npm] ( https://img.shields.io/npm/dt/@code4bones/react-c4b-ui?style=flat-square )
12+ ![ npm] ( https://img.shields.io/npm/v/@code4bones/react-c4b-ui?label=latest )
13+ ![ npm] ( https://img.shields.io/npm/dt/@code4bones/react-c4b-ui?style=flat-square&label=installs )
1314
1415![ ] ( https://img.shields.io/github/downloads/code4bones/react-c4b-ui/total ) ![ ] ( https://img.shields.io/github/watchers/code4bones/react-c4b-ui ) ![ ] ( https://img.shields.io/github/forks/code4bones/react-c4b-ui ) ![ ] ( https://img.shields.io/github/release/code4bones/react-c4b-ui ) ![ ] ( https://img.shields.io/github/issues/code4bones/react-c4b-ui )
1516
2728
2829` $ yarn add @code4bones/react-c4b-ui `
2930
30- #### Initial usage
31+ #### Brief
3132
3233``` tsx
3334
34- import {TreeMenu , TreeMenuActions ,TreeMenuItem } from " @code4bones/react-c4b-ui" ;
35- import " @code4bones/react-c4b-ui/build/styles.css" ;
35+ import {TreeMenu , TreeMenuActions ,TreeMenuItem } from " @code4bones/react-c4b-ui" ;
36+ import " @code4bones/react-c4b-ui/build/styles.css" ;
3637
37- const ITEMS : TreeMenuItem [] = [{
38- id:" item1" ,
39- title:" Item 1" ,
40- childs:[{
41- id:" sub" ,
42- title:" Subitem 1" ,
43- }]
44- }];
38+ const ITEMS : TreeMenuItem [] = [{
39+ id:" item1" ,
40+ title:" Item 1" ,
41+ // other TreeMenuItem's props
42+ childs:[{
43+ id:" sub" ,
44+ title:" Subitem 1" ,
45+ }]
46+ }];
4547
46- const ref = createRef <TreeMenuActions >();
48+ // if your need to use exponsed actions
49+ const ref = createRef <TreeMenuActions >();
4750
48- <TreeMenu
49- ref = { ref }
50- tems = { ITEMS }
51- onClick = { onClick }
52- />
51+ <TreeMenu
52+ ref = { ref }
53+ tems = { ITEMS }
54+ onClick = { onClick }
55+ />
5356
5457```
5558
100103
101104### Sample
102105
103- Sample available via storybook ` yarn storybook `
106+ Sample available via storybook ` yarn storybook `
You can’t perform that action at this time.
0 commit comments