Pages
Ui
Represents the store which all components connect to.
States
case (Storage.Local.get("ui.dark-mode")) {
Result::Err => Window.matchesMediaQuery("(prefers-color-scheme: dark)")
Result::Ok(value) => value == "true"
}
Whether or not to show dark mode.
Window.addMediaQueryListener(
"(max-width: 1000px)",
(active : Bool) { next { mobile = active } })
A media query listener for to set mobile property.
Whether or not we are in a mobile view.
Functions
disabledHandler
(
disabled
:
Bool
handler
:
Function(a, Promise(Never, Void))
)
:
Function(a, Promise(Never, Void))
A function to not do anything based on a disabled argument.
inputDelayHandler
(
timeoutId
:
Number
delay
:
Number
event
:
Html.Event
)
:
Tuple(Number, String, Promise(Never, Void))
A function to handle changes from input delay.
Returns if the given element is fully visible on the screen.
TODO: Move to core library.
Returns if the given element is visible on the screen.
TODO: Move to core library.
Scrolls the given element into view if it's not visible.
TODO: Move to core library.
Sets the dark mode state.