NetMan d837f77431 | ||
---|---|---|
README.md | ||
index.js | ||
package.json | ||
style.css |
README.md
odin-simple-dropdown
Simple dropdown menu - click on button makes the menu appear :)
My first npm package with the-odin-project :D
usage
install: npm i odin-simple-dropdown
import in your project:
import dropdownMenu from "odin-simple-dropdown"
the default style is at ./node_modules/odin-simple-dropdown/style.css
and is imported at index.js
in the same location
syntax
dropdownMenu(btnTitle, ...elements)
example
dropdownMenu("Dropdown!", "Home", "About", "Contact")
it returns a dom node that you can append using append/appendChild
license
ISC