alin1k / simple-dropdown

A React component library that offers a simple Dropdown menu.
https://simple-dropdown.vercel.app
MIT License
0 stars 0 forks source link
component-library dropdown featured-project react typescript

simple-dropdown

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

[!IMPORTANT] Documentation is currently being worked on.

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.