@legion-lib/react-breadcrumb

1.0.0 • Public • Published

react-breadcrumb

react-breadcrumb

Install

npm i @legion-lib/react-breadcrumb

Usage

import { Breadcrumb } from '@legion-lib/react-breadcrumb'

export default class App extends Component {
    constructor(props) {
        super(props);
        this.state = {
            level: 3
        };
    }

    render() {
        const items = [];
        items.push({ label: "Level 1", value: 1, });
        items.push({ label: "Level 2", value: 2, });
        items.push({ label: "Level 3", value: 3, });

        return (
        <div>
        <Breadcrumb items={items} value={this.state.level} onChange={(item) => this.setState({level: item.value})}/>
        <div>
            Level : {this.state.level}
        </div>
        </div>
        )
    }
}

License

MIT

/@legion-lib/react-breadcrumb/

    Package Sidebar

    Install

    npm i @legion-lib/react-breadcrumb

    Weekly Downloads

    5

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    85.9 kB

    Total Files

    24

    Last publish

    Collaborators

    • conganhhcmus
    • khoarin
    • hoangpham994
    • parsonsnguyen
    • hoangnguyen.uit
    • dungkos
    • hubert_duong