Skip to content

Latest commit

 

History

History
76 lines (50 loc) · 1.49 KB

README.md

File metadata and controls

76 lines (50 loc) · 1.49 KB

simple-dropdown

simple-dropdown is a React component library that offers a simple Dropdown menu.

Installation

Install the library using npm

npm install alin-simple-dropdown

Usage/Examples

import { Dropdown, DropdownLabel, DropdownMenu, DropdownButton } from 'alin-simple-dropdown'

function App() {
  return (
    <Dropdown>
      <DropdownLabel>Click me!</DropdownLabel>
      <DropdownMenu>
        <DropdownButton clickEvent={()=>console.log("first button")}>Button 1</DropdownButton>
        <DropdownButton clickEvent={()=>console.log("second button")}>Button 2</DropdownButton>
        <DropdownButton clickEvent={()=>console.log("third button")}>Button 3</DropdownButton>
      </DropdownMenu>
    </Dropdown>
  )
}

Run Locally

Clone the project

  git clone https://github.com/alin1k/simple-dropdown.git

Go to the project directory

  cd simple-dropdown

Install dependencies

  npm install

Start Storybook

  npm run storybook

Edit src/App.tsx to see the changes

Contributing

Contributions are always welcome!

Please adhere to this project's code of conduct.

CONTRIBUTING.md coming soon.