-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDropdown.res
90 lines (82 loc) · 2.35 KB
/
Dropdown.res
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
open Types
type autoClose = Bool(bool) | Side([#outside | #inside])
type drop = [#up | #start | #end | #down]
type focus = Bool(bool) | Keyboard([#keyboard])
type toggleMetadata = {source: [#select | #click | #rootClose | #keydown]}
@module("react-bootstrap") @react.component
external make: (
~align: [#start | #end]=?,
~_as: string=?,
~autoClose: autoClose=?,
~drop: drop=?,
~flip: bool=?,
~focusFirstItemOnShow: focus=?,
~navbar: bool=?,
~onSelect: (~eventKey: string, ~event: ReactEvent.Selection.t) => unit=?,
~onToggle: (~isOpen: bool, ~event: ReactEvent.Synthetic.t, ~metadata: toggleMetadata) => unit=?,
~show: bool=?,
~className: string=?,
~children: React.element,
~bsPrefix: string=?,
) => React.element = "Dropdown"
module Toggle = {
@module("react-bootstrap") @scope("Dropdown") @react.component
external make: (
~_as: string=?,
~childBsPrefix: string=?,
~id: string=?,
~split: bool=?,
~className: string=?,
~children: React.element,
~bsPrefix: string=?,
) => React.element = "Toggle"
}
module Menu = {
@module("react-bootstrap") @scope("Dropdown") @react.component
external make: (
~align: [#start | #end]=?,
~_as: string=?,
~flip: bool=?,
~onSelect: (~eventKey: string, ~event: ReactEvent.Selection.t) => unit=?,
~popperConfig: {.}=?,
~renderOnMount: bool=?,
~rootCloseEvent: [#click | #mousedown]=?,
~show: bool=?,
~variant: variant=?,
~className: string=?,
~children: React.element,
~bsPrefix: string=?,
) => React.element = "Menu"
}
module Item = {
@module("react-bootstrap") @scope("Dropdown") @react.component
external make: (
~active: bool=?,
~_as: string=?,
~disabled: bool=?,
~eventKey: string=?,
~href: string=?,
~onClick: ReactEvent.Mouse.t,
~className: string=?,
~children: React.element,
~bsPrefix: string=?,
) => React.element = "Item"
}
module Header = {
@module("react-bootstrap") @scope("Dropdown") @react.component
external make: (
~_as: string=?,
~className: string=?,
~children: React.element,
~bsPrefix: string,
) => React.element = "Header"
}
module Divider = {
@module("react-bootstrap") @scope("Dropdown") @react.component
external make: (
~_as: string=?,
~className: string=?,
~children: React.element,
~bsPrefix: string,
) => React.element = "Divider"
}