I have a binding for Headless UI Dialog that stopped working recently. Maybe after upgrading to Rescript 11. The generated JS now has _open
instead of open
and I’m not sure why. I tried underscore prefix and suffix but both failed to have any effect.
@react.component @module("@headlessui/react")
external make: (
~onClose: unit => unit,
@as("open") ~_open: bool=?,
~children: React.element,
~className: string=?,
@as("as") ~_as: string=?
) => React.element = "Dialog"
module Panel = {
@react.component @module("@headlessui/react") @scope("Dialog")
external make: (~children: React.element, ~className: string=?) => React.element = "Panel"
}
module Title = {
@react.component @module("@headlessui/react") @scope("Dialog")
external make: (~children: React.element, ~className: string=?, @as("as") ~_as: string=?) => React.element = "Title"
}