4.0.0 • Published 1 year ago

react-multilevel-dropdown v4.0.0

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

Kontentino - Making social media a piece of cake

react-multilevel-dropdown by Kontentino

ReactJS multilevel dropdown component

📒 STORYBOOK

npm NPM NPM

React multilevel dropdown

Install

npm install react-multilevel-dropdown

NPM: npmjs.com/package/react-multilevel-dropdown

Development / testing

npm run storybook

Usage / Example

import Dropdown from 'react-multilevel-dropdown';
...

<Dropdown
  title='Dropdown title'
>
  <Dropdown.Item
    onClick={() => doSomething()}
  >
    Item 1
  </Dropdown.Item>
  <Dropdown.Item>
    Item 2
    <Dropdown.Submenu>
      <Dropdown.Item>
        Subitem 1
      </Dropdown.Item>
    </Dropdown.Submenu>
  </Dropdown.Item>
</Dropdown>

Docs

Props

Dropdown

NAMETYPEDEFAULT VALUE
childrenReactNodeReactNode[]null
titleReactNodeReactNode[]null
isDisabledbooleanfalse
position"left", "right", "top-right", "top-left"left
buttonVariant"primary", "secondary", "tertiary", "special", "special-success", "dashed"secondary
isActivebooleanfalse
openOnHoverbooleanfalse
wrapperClassNamestringnull
buttonClassNamestringnull
menuClassNamestringnull
onClick(x?: any) => any() => null

Item

NAMETYPEDEFAULT VALUE
childrenReactNodeReactNode[]null
onClick(x?: any) => any() => null
isActivebooleanfalse
classNamestringnull
isDisabledbooleanfalse

Submenu

NAMETYPEDEFAULT VALUE
childrenReactNodeReactNode[]null
position"left", "right", "bottom", "left-top", "right-top"left
classNamestringnull