Skip to content

guillaume34110/dropdown

Repository files navigation

dropdown

dropdown component

NPM JavaScript Style Guide

https://www.npmjs.com/package/gaillardguillaumedropdown-menu

Install

npm i gg-dropdown-menu

Usage

To use this component you need an array of string named array and a "useState" to set and handle the new value of the dropdown

import React,{useState}from 'react'

import Dropdown from 'gg-dropdown-menu/dist/index.js'
import 'gg-dropdown-menu/dist-unmignified/dropdown.css'

const myComponent{
    
    const array = []
    const [currentSelection ,setCurrentSelection] = useState(array[0])
  
    return (
    <Dropdown array = {array} currentSelection = {currentSelection} setCurrentSelection = {setCurrentSelection}/>
    )
}

if you want restyle this component use this css file.

License

MIT © guillaume34110

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published