Routing System
We’ve created these dynamic routes, so the Sidenav and DefaultNavbar components would not get too loaded with code. You will find all our demo routes for the Sidenav in src/routes.js and for the DefaultNavbar in src/page.routes.js
Sidenav
- The
typekey with thecollapsevalue is used for a route. - The
typekey with thetitlevalue is used for a title inside theSidenav. - The
typekey with thedividervalue is used for a divider betweenSidenavitems. - The
namekey is used for the name of the route on theSidenav. - The
keykey is used for the key of the route (It will help you with the key prop inside a loop). - The
iconkey is used for the icon of the route on theSidenav, you have to add a node. - The
collapsekey is used for making a collapsible item on theSidenavthat contains other routes inside (nested routes), you need to pass the nested routes inside an array as a value for thecollapsekey. - The
routekey is used to store the route location which is used for the react router. - The
hrefkey is used to store the external links location. - The
titlekey is only for the item with the type oftitleand its used for the title text on theSidenav. - The
componentkey is used to store the component of its route.
Default Navbar
- The
namekey is used for the name of the route on the Navbar - The
iconkey is used for the icon of the route on the Navbar. - The
collapsekey is used for making a collapsible item on the Navbar that contains other routes inside (nested routes), you need to pass the nested routes inside an array as a value for thecollapsekey. - The
routekey is used to store the route location which is used for the react router. - The
hrefkey is used to store the external links location. - The
componentkey is used to store the component of its route. - The
dropdownkey is used to define that the item should open a dropdown for its collapse items. - The
descriptionkey is used to define the description of a route under its name - The
columnskey is used to define that how the content should look inside the dropdown menu as columns, you can set the columns amount based on this key. - The
rowsPerColumnkey is used to define that how many rows should be in a column.