react-components-library-dropdownmenu

1.0.3 • Public • Published

react-components-library-dropdownmenu

A DropDownMenu component made in React that can be customized using the included styled component css files (these are of three types, onEvent, generalStyle and transition, use one of each in any combination) which you should include in a wrapper container that contains the dropdown menu. It will only work if the onEvent type is followed by the transition type. For instance this is ok:

const Wrapper = styled.div ` ${Style1}

${OnHover}

${Transition2} `

And this is not: const Wrapper = styled.div `

${OnHover}

${Style1}

${Transition2} `

The wrapper must contain the drop down menu and can pass to it props:

  • props.headingComponent: component that represents the uppermost part of the drop down menu
  • props.childrenComponent: array of components that represent the lower parts of the drop down menu

Example: const App = () => {

const headingComponent = (

odsfdsfdssdfsdfdsffj
); const childrenComponents = [ (
aha
), (
aha
), (
aha
), (
aha
), ];

return (

<Wrapper>
  <DropDownMenu headingComponent={headingComponent}
  childrenComponents={childrenComponents}/>
</Wrapper>

); }

NPM JavaScript Style Guide

Install

npm install --save react-components-library-dropdownmenu

License

MIT © DomenHocevar

Dependencies (2)

Dev Dependencies (19)

Package Sidebar

Install

npm i react-components-library-dropdownmenu

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

16.4 kB

Total Files

7

Last publish

Collaborators

  • domenhocevar