0.0.21 • Published 6 years ago
cavemen v0.0.21
Cavemen
Primitive React Components
PLEASE NOTE: At this current time, searchable
cannot be used with multiple
Dropdown
Prop | Description | Type | Required | Default Value |
---|---|---|---|---|
options | An array of Option type to display | Option[] | * | - |
onChange | An event handler for when an Option is selected. | Handler | * | - |
clearable | Whether or not the Dropdown Option can be cleared | Boolean | false | |
default | A default Option to be selected | Option | - | |
disabled | Whether or not the Dropdown is disabled | Boolean | false | |
id | An ID to append to the Dropdown wrapper | String | - | |
label | A label for the Dropdown - appears directly above it | String | - | |
multiple | Whether or not the Dropdown should be a mult-select | Boolean | false | |
open | Whether or not the Dropdown is open on render | Boolean | false | |
placeholder | Placeholder text before a user selects an option | String | - | |
searchable | Allows users to search for Option | Boolean | false | |
trigger | A component passed down as a trigger - for example, if you want an icon to have dropdown functionality | ReactNode | - |
Dropdown Types
Option
interface Option {
value: string | number,
name: string
}
Handler
type Handler = (option: Option | Option[] | null, event: SyntheticEvent) => void;
0.0.21
6 years ago
0.0.20
6 years ago
0.0.19
6 years ago
0.0.18
6 years ago
0.0.17
6 years ago
0.0.16
6 years ago
0.0.15
6 years ago
0.0.14
6 years ago
0.0.13
6 years ago
0.0.12
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago