Created
January 10, 2020 10:56
-
-
Save happylinks/ecaea6a2f0741bf40a9574f365d194b0 to your computer and use it in GitHub Desktop.
Reach reasonml bindings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Menu = { | |
[@bs.module "@reach/menu-button"] [@react.component] | |
external make: | |
(~className: string=?, ~children: React.element) => React.element = | |
"Menu"; | |
module Button = { | |
[@bs.module "@reach/menu-button"] [@react.component] | |
external make: (~children: React.element) => React.element = "MenuButton"; | |
}; | |
module List = { | |
[@bs.module "@reach/menu-button"] [@react.component] | |
external make: (~children: React.element) => React.element = "MenuList"; | |
}; | |
module Item = { | |
[@bs.module "@reach/menu-button"] [@react.component] | |
external make: | |
(~children: React.element, ~onSelect: unit => unit) => React.element = | |
"MenuItem"; | |
}; | |
module Link = { | |
[@bs.module "@reach/menu-button"] [@react.component] | |
external make: | |
(~children: React.element, ~as_: string, ~href: string) => React.element = | |
"MenuLink"; | |
}; | |
}; | |
module Dialog = { | |
/* TODO: figure out ariaLabel */ | |
[@bs.module "@reach/dialog"] [@react.component] | |
external make: | |
( | |
~className: string=?, | |
~isOpen: bool, | |
~ariaLabel: string=?, | |
~ariaLabelledBy: string=?, | |
~onDismiss: unit => unit=?, | |
~children: React.element | |
) => | |
React.element = | |
"Dialog"; | |
}; | |
module Tabs = { | |
/* TODO: figure out ariaLabel */ | |
[@bs.module "@reach/tabs"] [@react.component] | |
external make: | |
( | |
~className: string=?, | |
~onChange: int => unit=?, | |
~defaultIndex: int=?, | |
~index: int=?, | |
~children: React.element | |
) => | |
React.element = | |
"Tabs"; | |
module TabList = { | |
[@bs.module "@reach/tabs"] [@react.component] | |
external make: (~children: React.element) => React.element = "TabList"; | |
}; | |
module Tab = { | |
[@bs.module "@reach/tabs"] [@react.component] | |
external make: | |
(~className: string=?, ~children: React.element) => React.element = | |
"Tab"; | |
}; | |
module TabPanels = { | |
[@bs.module "@reach/tabs"] [@react.component] | |
external make: (~children: React.element) => React.element = "TabPanels"; | |
}; | |
module TabPanel = { | |
[@bs.module "@reach/tabs"] [@react.component] | |
external make: (~children: React.element) => React.element = "TabPanel"; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment