0.0.7 • Published 11 months ago

gosu-dropdown v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

React Dropdown

Gosu React Dropdown is a simple React dropdown component

Installation

If you're using npm, in the command prompt run:

npm install gosu-dropdown --save

If you're using yarn, run:

yarn add gosu-dropdown

Usage

To use the component, first import Dropdown into your file:

import Dropdown from "gosu-dropdown";
const options = [
  { key: '1', value: <div>🇺🇸 English</div>, label: <div>🇺🇸</div>  },
  { key: '2', value: <div>🇵🇱 Polski</div>, label: <div>🇵🇱</div>  },
  { key: '3', value: <div>🇺🇦 Україньскою</div>, label: <div>🇺🇦</div>  },
]

<Dropdown
  defaultSelectedKey="1"
  listPlacement="bottomRight"
  options={options} />

Props

PropertyTypeDefaultDescription
optionsArray[]{key: string, value: string, label?: string }
onChangefunctionundefined
listPlacementstringbottomCenterbottomCenter, bottomLeft, bottomRight
caretColorstylesundefined#000
placeholderstylesundefined'Select option'
defaultSelectedKeynumberstringAny key from options
isOpenbooleanundefinedNeeds for development, if you want add custom style
styleRootstylesundefinedCustom style for Root
styleTriggerstylesundefinedCustom style for Trigger
styleOptionstylesundefinedCustom style for Option
styleListstylesundefinedCustom style for List
0.0.7

11 months ago

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago