Skip to content

Commit 4565567

Browse files
author
matdsoupe
committed
split files
1 parent f6aaf7b commit 4565567

25 files changed

+816
-819
lines changed

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
};
2929
in {
3030
devShell = pkgs.mkShell {
31-
name = "kirby";
31+
name = "rescript-react-bootstrap";
3232
buildInputs = with pkgs; with pkgs.nodePackages; [
3333
# pacotes pro ambiente de desenvolvimento
3434
# dev packages

src/Accordion.res

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
@module("react-bootstrap") @react.component
2+
external make: (
3+
~activeKey: string=?,
4+
~_as: string=?,
5+
~defaultActiveKey: string=?,
6+
~flush: bool=?,
7+
~className: string=?,
8+
~children: React.element,
9+
~bsPrefix: string=?,
10+
) => React.element = "Accordion"
11+
12+
module Item = {
13+
@module("react-bootstrap") @scope("Accordion") @react.component
14+
external make: (
15+
~_as: string=?,
16+
~eventKey: string,
17+
~className: string=?,
18+
~children: React.element,
19+
~bsPrefix: string=?,
20+
) => React.element = "Item"
21+
}
22+
23+
module Header = {
24+
@module("react-bootstrap") @scope("Accordion") @react.component
25+
external make: (
26+
~_as: string=?,
27+
~onClick: ReactEvent.Mouse.t => unit,
28+
~bsPrefix: string=?,
29+
) => React.element = "Header"
30+
}
31+
32+
module Body = {
33+
@module("react-bootstrap") @scope("Accordion") @react.component
34+
external make: (
35+
~_as: string=?,
36+
~className: string=?,
37+
~children: React.element,
38+
~bsPrefix: string=?,
39+
) => React.element = "Body"
40+
}
41+
42+
module Button = {
43+
@module("react-bootstrap") @scope("Accordion") @react.component
44+
external make: (
45+
~_as: string=?,
46+
~onClick: ReactEvent.Mouse.t => unit,
47+
~className: string=?,
48+
~children: React.element,
49+
~bsPrefix: string=?,
50+
) => React.element = "Button"
51+
52+
@module("react-bootstrap") @scope("AccordionButton") @val
53+
external useAccordionButton: (
54+
~eventKey: string,
55+
~onClick: unit => unit,
56+
ReactEvent.Mouse.t,
57+
) => unit = "useAccordionButton"
58+
}
59+
60+
module Collapse = {
61+
@module("react-bootstrap") @scope("Accordion") @react.component
62+
external make: (
63+
~_as: string=?,
64+
~children: React.element,
65+
~className: string=?,
66+
~children: React.element,
67+
~bsPrefix: string,
68+
) => React.element = "Collapse"
69+
}

src/Alert.res

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
open Types
2+
3+
type transition = ElemType(React.element) | Bool(bool)
4+
5+
@module("react-bootstrap") @react.component
6+
external make: (
7+
~closeLabel: string=?,
8+
~closeVariant: [#white]=?,
9+
~dismissible: bool=?,
10+
~onClose: (~show: bool) => bool,
11+
~show: bool=?,
12+
~transition: transition=?,
13+
~variant: variant=?,
14+
~className: string=?,
15+
~children: React.element,
16+
~bsPrefix: string=?,
17+
) => React.element = "Alert"
18+
19+
module Heading = {
20+
@module("react-bootstrap") @scope("Alert") @react.component
21+
external make: (
22+
~_as: string=?,
23+
~children: React.element,
24+
~className: string=?,
25+
~bsPrefix: string,
26+
) => React.element = "Heading"
27+
}
28+
29+
module Link = {
30+
@module("react-bootstrap") @scope("Alert") @react.component
31+
external make: (
32+
~_as: string=?,
33+
~children: React.element,
34+
~className: string=?,
35+
~bsPrefix: string,
36+
) => React.element = "Link"
37+
}

src/Badge.res

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
open Types
2+
3+
@module("react-bootstrap") @react.component
4+
external make: (
5+
~_as: string=?,
6+
~bg: variant=?,
7+
~pill: bool=?,
8+
~text: variant=?,
9+
~className: string=?,
10+
~children: React.element,
11+
~bsPrefix: string=?,
12+
) => React.element = "Badge"

src/Breadcrumb.res

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
open Types
2+
3+
@module("react-bootstrap") @react.component
4+
external make: (
5+
~_as: string=?,
6+
~label: string=?,
7+
~listProps: {.}=?,
8+
~className: string=?,
9+
~children: React.element,
10+
~bsPrefix: string=?,
11+
) => React.element = "Breadcrumb"
12+
13+
module Item = {
14+
@module("react-bootstrap") @scope("Breadcrumb") @react.component
15+
external make: (
16+
~active: bool=?,
17+
~_as: string=?,
18+
~href: string=?,
19+
~linkAs: string=?,
20+
~linkProps: {.}=?,
21+
~target: string=?,
22+
~title: reactNode=?,
23+
~className: string=?,
24+
~children: React.element,
25+
~bsPrefix: string=?,
26+
) => React.element = "Item"
27+
}

src/Button.res

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
open Types
2+
3+
type buttonType = [#button | #reset | #submit | #null]
4+
5+
@module("react-bootstrap") @react.component
6+
external make: (
7+
~active: bool=?,
8+
~_as: string=?,
9+
~className: string=?,
10+
~disabled: bool=?,
11+
~href: string=?,
12+
~size: size=?,
13+
~_type: buttonType=?,
14+
~variant: variant=?,
15+
~className: string=?,
16+
~children: React.element,
17+
~bsPrefix: string=?,
18+
) => React.element = "Button"

src/ButtonGroup.res

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
open Types
2+
3+
@module("react-bootstrap") @react.component
4+
external make: (
5+
~_as: string=?,
6+
~role: string=?,
7+
~size: size=?,
8+
~vertical: bool=?,
9+
~className: string=?,
10+
~children: React.element,
11+
~bsPrefix: string=?,
12+
) => React.element = "ButtonGroup"

src/ButtonToolbar.res

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@module("react-bootstrap") @react.component
2+
external make: (
3+
~role: string=?,
4+
~className: string=?,
5+
~children: React.element,
6+
~bsPrefix: string=?,
7+
) => React.element = "ButtonToolbar"

src/Card.res

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
open Types
2+
3+
@module("react-bootstrap") @react.component
4+
external make: (
5+
~_as: string=?,
6+
~bg: variant=?,
7+
~body: bool=?,
8+
~border: variant=?,
9+
~text: variant=?,
10+
~className: string=?,
11+
~children: React.element,
12+
~bsPrefix: string=?,
13+
) => React.element = "Card"
14+
15+
module Body = {
16+
@module("react-bootstrap") @scope("Card") @react.component
17+
external make: (
18+
~_as: string=?,
19+
~className: string=?,
20+
~children: React.element,
21+
~bsPrefix: string,
22+
) => React.element = "Body"
23+
}
24+
25+
module Footer = {
26+
@module("react-bootstrap") @scope("Card") @react.component
27+
external make: (
28+
~_as: string=?,
29+
~className: string=?,
30+
~children: React.element,
31+
~bsPrefix: string,
32+
) => React.element = "Footer"
33+
}
34+
35+
module Header = {
36+
@module("react-bootstrap") @scope("Card") @react.component
37+
external make: (
38+
~_as: string=?,
39+
~className: string=?,
40+
~children: React.element,
41+
~bsPrefix: string=?,
42+
) => React.element = "Header"
43+
}
44+
45+
module Img = {
46+
@module("react-bootstrap") @scope("Card") @react.component
47+
external make: (
48+
~_as: string=?,
49+
~src: string,
50+
~variant: [#top | #bottom]=?,
51+
~className: string=?,
52+
~bsPrefix: string=?,
53+
) => React.element = "Img"
54+
}
55+
56+
module ImgOverlay = {
57+
@module("react-bootstrap") @scope("Card") @react.component
58+
external make: (
59+
~_as: string=?,
60+
~className: string=?,
61+
~children: React.element,
62+
~bsPrefix: string,
63+
) => React.element = "ImgOverlay"
64+
}
65+
66+
module Link = {
67+
@module("react-bootstrap") @scope("Card") @react.component
68+
external make: (
69+
~_as: string=?,
70+
~href: string,
71+
~children: React.element,
72+
~bsPrefix: string,
73+
) => React.element = "Link"
74+
}
75+
76+
module Subtitle = {
77+
@module("react-bootstrap") @scope("Card") @react.component
78+
external make: (
79+
~_as: string=?,
80+
~className: string=?,
81+
~children: React.element,
82+
~bsPrefix: string,
83+
) => React.element = "Subtitle"
84+
}
85+
86+
module Text = {
87+
@module("react-bootstrap") @scope("Card") @react.component
88+
external make: (
89+
~_as: string=?,
90+
~className: string=?,
91+
~children: React.element,
92+
~bsPrefix: string,
93+
) => React.element = "Text"
94+
}
95+
96+
module Title = {
97+
@module("react-bootstrap") @scope("Card") @react.component
98+
external make: (
99+
~_as: string=?,
100+
~className: string=?,
101+
~children: React.element,
102+
~bsPrefix: string,
103+
) => React.element = "Title"
104+
}
105+
106+
module CardGroup = {
107+
@module("react-bootstrap") @scope("Card") @react.component
108+
external make: (
109+
~_as: string=?,
110+
~className: string=?,
111+
~children: React.element,
112+
~bsPrefix: string,
113+
) => React.element = "CardGroup"
114+
}
115+
116+
module CardColumns = {
117+
@module("react-bootstrap") @scope("Card") @react.component
118+
external make: (
119+
~_as: string=?,
120+
~className: string,
121+
~children: React.element,
122+
~bsPrefix: string,
123+
) => React.element = "CardColumns"
124+
}

src/Carousel.res

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
open Types
2+
3+
type pause = Hover([#hover]) | False(bool)
4+
5+
@module("react-bootstrap") @react.component
6+
external make: (
7+
~activeIndex: int=?,
8+
~_as: string=?,
9+
~controls: bool=?,
10+
~fade: bool=?,
11+
~indicatorLabels: array<'a>=?,
12+
~indicators: bool=?,
13+
~interval: bool=?,
14+
~keyboard: bool=?,
15+
~nextIcon: reactNode=?,
16+
~nextLabel: string=?,
17+
~onSelect: (~eventKey: int, ~event: option<ReactEvent.Selection.t>) => unit,
18+
~onSlid: (~eventKey: int, ~direction: [#start | #end]) => unit,
19+
~onSlide: (~eventKey: int, ~direction: [#start | #end]) => unit,
20+
~pause: [#hover],
21+
~prevIcon: reactNode=?,
22+
~prevLabel: string=?,
23+
~slide: bool=?,
24+
~touch: bool=?,
25+
~variant: [#dark]=?,
26+
~wrap: bool=?,
27+
~className: string=?,
28+
~children: React.element,
29+
~bsPrefix: string=?,
30+
) => React.element = "Carousel"
31+
32+
module Item = {
33+
@module("react-bootstrap") @scope("Carousel") @react.component
34+
external make: (
35+
~_as: string=?,
36+
~interval: int=?,
37+
~className: string=?,
38+
~children: React.element,
39+
~bsPrefix: string=?,
40+
) => React.element = "Item"
41+
}
42+
43+
module Caption = {
44+
@module("react-bootstrap") @scope("Carousel") @react.component
45+
external make: (
46+
~_as: string=?,
47+
~className: string=?,
48+
~children: React.element,
49+
~bsPrefix: string,
50+
) => React.element = "Caption"
51+
}

src/CloseButton.res

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@module("react-bootstrap") @react.component
2+
external make: (
3+
~\"aria-label": string=?,
4+
~onClick: ReactEvent.Form.t => unit=?,
5+
~className: string=?,
6+
~children: React.element=?,
7+
~variant: [#white]=?,
8+
) => React.element = "CloseButton"

0 commit comments

Comments
 (0)