Improve component doc
This commit is contained in:
@@ -7,7 +7,7 @@ This layer include [React components](https://facebook.github.io/react/docs/reac
|
|||||||
To add a new page in Home.jsx (with side-bar and top-bar) :
|
To add a new page in Home.jsx (with side-bar and top-bar) :
|
||||||
|
|
||||||
- In components/Home.jsx
|
- In components/Home.jsx
|
||||||
- Inside the <Switch> tag
|
- Inside the [Switch] tag
|
||||||
|
|
||||||
```jsx
|
```jsx
|
||||||
<SidebarMain>
|
<SidebarMain>
|
||||||
@@ -17,7 +17,7 @@ To add a new page in Home.jsx (with side-bar and top-bar) :
|
|||||||
</SidebarMain>
|
</SidebarMain>
|
||||||
```
|
```
|
||||||
|
|
||||||
- Add your component route between <Switch> tag to load in home page
|
- Add your component route between [Switch] tag to load in home page
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
<Route path="/route-name" component={ComponentName} />
|
<Route path="/route-name" component={ComponentName} />
|
||||||
@@ -26,7 +26,7 @@ To add a new page in Home.jsx (with side-bar and top-bar) :
|
|||||||
To add a new item for menu bar
|
To add a new item for menu bar
|
||||||
|
|
||||||
- In components/Home.jsx
|
- In components/Home.jsx
|
||||||
- Inside the <Menu> tag
|
- Inside the [Menu] tag
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
<SidebarContent>
|
<SidebarContent>
|
||||||
@@ -36,7 +36,7 @@ To add a new item for menu bar
|
|||||||
</SidebarContent>
|
</SidebarContent>
|
||||||
```
|
```
|
||||||
|
|
||||||
- Add your component NavLink between <Menu> tag
|
- Add your component NavLink between [Menu] tag
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
<NavLink to='/route-name'>
|
<NavLink to='/route-name'>
|
||||||
@@ -45,12 +45,12 @@ To add a new item for menu bar
|
|||||||
</NavLink>
|
</NavLink>
|
||||||
```
|
```
|
||||||
|
|
||||||
*Note: You can choose your icon for <SvgIcon /> from [material-ui icons](http://www.material-ui.com/#/components/svg-icon)*
|
*Note: You can choose your icon for [SvgIcon] from [material-ui icons](http://www.material-ui.com/#/components/svg-icon)*
|
||||||
|
|
||||||
To add your page in Master page (without side-bar menu and top-bar)
|
To add your page in Master page (without side-bar menu and top-bar)
|
||||||
|
|
||||||
- In components/Master/Master.tsx
|
- In components/Master/Master.tsx
|
||||||
- Add your <Route /> tag between <Switch /> tag
|
- Add your [Route] tag between [Switch] tag
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
<Switch>
|
<Switch>
|
||||||
|
|||||||
Reference in New Issue
Block a user