Skip to content

Commit 7590940

Browse files
author
matdsoupe
committed
adds Pagination, Placehodler and ProgressBar components
1 parent fa9ab94 commit 7590940

File tree

3 files changed

+117
-0
lines changed

3 files changed

+117
-0
lines changed

src/Pagination.res

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
open Types
2+
3+
@module("react-bootstrap") @react.component
4+
external make: (
5+
~size: size=?,
6+
~className: string=?,
7+
~children: React.element,
8+
~bsPrefix: string=?,
9+
) => React.element = "Pagination"
10+
11+
module Item = {
12+
@module("react-bootstrap") @scope("Pagination") @react.component
13+
external make: (
14+
~active: bool=?,
15+
~activeLabel: string=?,
16+
~disabled: bool=?,
17+
~href: string=?,
18+
~onClick: ReactEvent.Mouse.t => unit=?,
19+
~className: string=?,
20+
~children: React.element,
21+
) => React.element = "Item"
22+
}
23+
24+
module First = {
25+
@module("react-bootstrap") @scope("Pagination") @react.component
26+
external make: (
27+
~active: bool=?,
28+
~activeLabel: string=?,
29+
~disabled: bool=?,
30+
~className: string=?,
31+
) => React.element = "First"
32+
}
33+
34+
module Prev = {
35+
@module("react-bootstrap") @scope("Pagination") @react.component
36+
external make: (
37+
~active: bool=?,
38+
~activeLabel: string=?,
39+
~disabled: bool=?,
40+
~className: string=?,
41+
) => React.element = "Prev"
42+
}
43+
44+
module Ellipsis = {
45+
@module("react-bootstrap") @scope("Pagination") @react.component
46+
external make: (
47+
~active: bool=?,
48+
~activeLabel: string=?,
49+
~disabled: bool=?,
50+
~className: string=?,
51+
) => React.element = "Ellipsis"
52+
}
53+
54+
module Next = {
55+
@module("react-bootstrap") @scope("Pagination") @react.component
56+
external make: (
57+
~active: bool=?,
58+
~activeLabel: string=?,
59+
~disabled: bool=?,
60+
~className: string=?,
61+
) => React.element = "Next"
62+
}
63+
64+
module Last = {
65+
@module("react-bootstrap") @scope("Pagination") @react.component
66+
external make: (
67+
~active: bool=?,
68+
~activeLabel: string=?,
69+
~disabled: bool=?,
70+
~className: string=?,
71+
) => React.element = "Last"
72+
}

src/Placeholder.res

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
type animation = [#glow | #wave]
2+
type size = [#xs | #sm | #lg]
3+
4+
@module("react-bootstrap") @react.component
5+
external make: (
6+
~animation: animation=?,
7+
~bg: Types.variant=?,
8+
~size: size=?,
9+
~className: string=?,
10+
~children: React.element,
11+
~bsPrefix: string=?,
12+
) => React.element = "Placeholder"
13+
14+
module Button = {
15+
@module("react-bootstrap") @scope("Placeholder") @react.component
16+
external make: (
17+
~animation: animation=?,
18+
~size: size=?,
19+
~variant: Types.variant=?,
20+
~className: string=?,
21+
~children: Rect.element,
22+
~bsPrefix: string=?,
23+
) => React.element = "Button"
24+
}

src/ProgressBar.res

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
open Types
2+
3+
type t
4+
5+
type variant = [#success | #danger | #warning | #info]
6+
7+
@module("react-bootstrap") @react.component
8+
external make: (
9+
~animated: bool=?,
10+
~children: t=?,
11+
~isChild: bool=?,
12+
~label: reactNode=?,
13+
~max: int=?,
14+
~min: int=?,
15+
~now: int=?,
16+
~striped: bool=?,
17+
~variant: variant=?,
18+
~visuallyHidden: bool=?,
19+
~className: string=?,
20+
~bsPrefix: string=?,
21+
) => React.element = "ProgressBar"

0 commit comments

Comments
 (0)