2.2.45 • Published 1 year ago

bsr-left-sidebar v2.2.45

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

bsr-left-sidebar

React component left sidebar

NPM JavaScript Style Guide

Install

npm install --save bsr-left-sidebar

Usage

import {LeftMenu, MenuItem, CreateItem} from "bsr-left-sidebar";
import 'bsr-left-sidebar/dist/index.css'
import React from "react";
import {TbPointFilled} from "react-icons/tb";
import {FaCaretDown, FaCaretRight} from "react-icons/fa";
import {RiMenuFill} from "react-icons/ri";

export default function P7_2(){
    const listItems:MenuItem[]=[];
    listItems.push(CreateItem({content:"menu1",icon:<RiMenuFill/>}))
    listItems.push(CreateItem({content:"menu2",icon:<RiMenuFill/>}))
    const m=new MenuItem();
    m.content="menu3"
    m.icon=<RiMenuFill/>
    m.items?.push(CreateItem({content:"subMenu"}))
    listItems.push(m)
    return(
        <div style={{display:"flex",width:"100%",height:"100%"}}>
            <LeftMenu
                iconTree={<TbPointFilled size={12}/>}
                paddingItem={15}
                minWidth={55}
                width={350}
                items={listItems}
                iconClose={<FaCaretRight color={"#6c6b6b"}/>}
                iconOpen={<FaCaretDown/>}
                iconToggle={<RiMenuFill size={30} color={"yellow"}/>}
            />
            <div>
                Content
            </div>

        </div>
    )
}

License

MIT © ionson100

Props, Function.

Examples, Help pages.

2.2.45

1 year ago

2.2.44

1 year ago

2.2.43

1 year ago

2.2.42

1 year ago