From e2699b6df2bd2eef62b7eedcb1f8e50a158cde34 Mon Sep 17 00:00:00 2001 From: Qolzam Date: Sat, 21 Oct 2017 13:52:08 +0700 Subject: [PATCH] [Docs]How to add a new component --- docs/layers/components.md | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/docs/layers/components.md b/docs/layers/components.md index 36cccc5..79f433a 100644 --- a/docs/layers/components.md +++ b/docs/layers/components.md @@ -1,3 +1,60 @@ # Components This layer include [React components](https://facebook.github.io/react/docs/react-component.html) that let you split the UI into independent, reusable pieces, and think about each piece in isolation. + +## Add a new component + +To add a new page in Home.jsx (with side-bar and top-bar) : + +- In components/Home.jsx +- Inside the tag + +```javascript + + + {/* Add your here! */} + + +``` + +- Add your component route between tag to load in home page + +```javascript + +``` + +To add a new item for menu bar + +- In components/Home.jsx +- Inside the tag + +```javascript + + + {/* Add you here */} + + +``` + +- Add your component NavLink between tag + +```javascript + + } /> + {/* Other menu itemes */} + +``` + +*Note: You can choose your icon for 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) + +- In components/Master/Master.tsx +- Add your tag between tag + +```javascript + + + {/* Other routes */} + +```