1.0.7 • Published 6 years ago

rc-nav v1.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

rc-nav

online demo

Usage

import React from 'react';
import Nav from '../src/nav.tsx';

const Item = Nav.Item;
const SubNav = Nav.SubNav;

var c=<Nav mode={'horizontal'}>
    <SubNav key={0} title={'菜单1'}>
        <Item key={0}>子选项1</Item>
        <Item key={1}>子选项2</Item>
    </SubNav>
    <Item key={0}>选项1</Item>
    <Item key={1}>选项2</Item>
    <SubNav key={1} title={'菜单1'}>
        <Item key={0}>子选项1</Item>
        <Item key={1}>子选项2</Item>
        <SubNav title={'子菜单'}>
            <Item key={0}>三级选项1</Item>
            <Item key={1}>三级选项2</Item>
        </SubNav>
    </SubNav>
</Nav>

NavProp

mode

type?:'horizontal' | 'vertical' default:'horizontal'

ItemProp

selected

type?:boolean,

onClick

type?:(e: React.SyntheticEvent) => void,

href

type?:string

SubNavProp

onTitleClick?

type:(e: React.SyntheticEvent) => void,

selected

type?: boolean,

display

type?: boolean,

title

type: React.ReactNode,

href

type?: string,

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago