-
-
Save drampelt/7856234a2bac6b0b5e337c1fd197d196 to your computer and use it in GitHub Desktop.
This file contains 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
@file:JsModule("@headlessui/react") | |
@file:JsNonModule | |
@file:Suppress("VariableNaming") | |
package headlessui | |
import react.FunctionComponent | |
import react.PropsWithChildren | |
import react.PropsWithClassName | |
external interface TransitionProps : PropsWithChildren, PropsWithClassName { | |
var show: Boolean | |
var `as`: dynamic | |
var appear: Boolean | |
var unmount: Boolean | |
var enter: String | |
var enterFrom: String | |
var enterTo: String | |
var entered: String | |
var leave: String | |
var leaveFrom: String | |
var leaveTo: String | |
} | |
external object Transition { | |
val Root: FunctionComponent<TransitionProps> | |
val Child: FunctionComponent<TransitionProps> | |
} | |
external interface DialogProps : PropsWithChildren, PropsWithClassName { | |
var open: Boolean | |
var onClose: (Boolean) -> Unit | |
var initialFocus: dynamic | |
var `as`: dynamic | |
var static: Boolean | |
var unmount: Boolean | |
} | |
external interface DialogChildProps : PropsWithChildren, PropsWithClassName { | |
var `as`: dynamic | |
} | |
external object Dialog : FunctionComponent<DialogProps> { | |
override var displayName: String? | |
val Overlay: FunctionComponent<DialogChildProps> | |
val Title: FunctionComponent<DialogChildProps> | |
val Description: FunctionComponent<DialogChildProps> | |
} | |
external interface MenuProps : PropsWithChildren, PropsWithClassName { | |
var `as`: dynamic | |
} | |
external interface MenuButtonProps : PropsWithChildren, PropsWithClassName { | |
var `as`: dynamic | |
} | |
external interface MenuItemsProps : PropsWithChildren, PropsWithClassName { | |
var `as`: dynamic | |
var static: Boolean | |
var unmount: Boolean | |
} | |
external interface MenuItemProps : PropsWithChildren, PropsWithClassName { | |
var `as`: dynamic | |
var disabled: Boolean | |
} | |
external object Menu : FunctionComponent<MenuProps> { | |
override var displayName: String? | |
val Button: FunctionComponent<MenuButtonProps> | |
val Items: FunctionComponent<MenuItemsProps> | |
val Item: FunctionComponent<MenuItemProps> | |
} | |
external interface MenuItemRenderProp { | |
var active: Boolean | |
var disabled: Boolean | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment