Dialog.res

 1// === Type definitions ===
 2type handle<'payload>
 3type actions
 4type changeEventDetails
 5
 6// === createHandle ===
 7@module("@base-ui/react/dialog") @scope("Dialog")
 8external createHandle: unit => handle<'payload> = "createHandle"
 9
10// === Root ===
11module Root = {
12  @module("@base-ui/react/dialog") @scope("Dialog") @jsx.component
13  external make: (
14    ~defaultOpen: bool=?,
15    @as("open") ~open_: bool=?,
16    ~onOpenChange: (bool, changeEventDetails) => unit=?,
17    ~handle: handle<'payload>=?,
18    ~modal: bool=?,
19    ~disablePointerDismissal: bool=?,
20    ~onOpenChangeComplete: bool => unit=?,
21    ~defaultTriggerId: string=?,
22    ~\"triggerId\": string=?,
23    ~children: Jsx.element=?,
24  ) => Jsx.element = "Root"
25}
26
27// === Trigger ===
28module Trigger = {
29  @module("@base-ui/react/dialog") @scope("Dialog") @jsx.component
30  external make: (
31    ~handle: handle<'payload>=?,
32    ~nativeButton: bool=?,
33    ~payload: 'payload=?,
34    ~id: string=?,
35    ~className: string=?,
36    ~children: Jsx.element=?,
37  ) => Jsx.element = "Trigger"
38}
39
40// === Portal ===
41module Portal = {
42  @module("@base-ui/react/dialog") @scope("Dialog") @jsx.component
43  external make: (
44    ~keepMounted: bool=?,
45    ~className: string=?,
46    ~children: Jsx.element=?,
47  ) => Jsx.element = "Portal"
48}
49
50// === Backdrop ===
51module Backdrop = {
52  @module("@base-ui/react/dialog") @scope("Dialog") @jsx.component
53  external make: (
54    ~forceRender: bool=?,
55    ~className: string=?,
56    ~children: Jsx.element=?,
57  ) => Jsx.element = "Backdrop"
58}
59
60// === Viewport ===
61module Viewport = {
62  @module("@base-ui/react/dialog") @scope("Dialog") @jsx.component
63  external make: (~className: string=?, ~children: Jsx.element=?) => Jsx.element = "Viewport"
64}
65
66// === Popup ===
67module Popup = {
68  @module("@base-ui/react/dialog") @scope("Dialog") @jsx.component
69  external make: (~className: string=?, ~children: Jsx.element=?) => Jsx.element = "Popup"
70}
71
72// === Title ===
73module Title = {
74  @module("@base-ui/react/dialog") @scope("Dialog") @jsx.component
75  external make: (~className: string=?, ~children: Jsx.element=?) => Jsx.element = "Title"
76}
77
78// === Description ===
79module Description = {
80  @module("@base-ui/react/dialog") @scope("Dialog") @jsx.component
81  external make: (~className: string=?, ~children: Jsx.element=?) => Jsx.element = "Description"
82}
83
84// === Close ===
85module Close = {
86  @module("@base-ui/react/dialog") @scope("Dialog") @jsx.component
87  external make: (
88    ~nativeButton: bool=?,
89    ~className: string=?,
90    ~children: Jsx.element=?,
91  ) => Jsx.element = "Close"
92}