Techsophy Sidebar
Package to render sidebar(side menu)
Installation
Techsophy Sidebar
Techsophy Sidebar is available as an npm package.
npm:
npm install techsophy-sidebar
yarn:
yarn add techsophy-sidebar
Getting started with Techsophy Sidebar
Example
import * as React from 'react';
import SideMenu from 'techsophy-sidebar';
import SideBarIcon from './SideBarIcon.svg'
const menuItems = [
{ id: 1, title: "TEST TITLE 1", selected: true, iconUrl: SideBarIcon }, ...
]
function App() {
return <SideMenu menuItems={menuItems} handleMenuclick={handler} />;
}
MenuItems must be a list of Object with id
(Unique Id for optimum rendering), title
(Title to be displayed in sidebar), selected
(have to pass Boolean to highlighted the selected sidebar item) and iconUrl
(icon path to render icon next to sidebar, if icon is not provided default icon will be used).
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.