HeldControl
Defined in: react/src/heldControl.ts:13
Properties
Section titled “Properties”guard: <
E>(handler?) => (event) =>void
Defined in: react/src/heldControl.ts:25
Wrap your click handler: a click on a held control does nothing.
Type Parameters
Section titled “Type Parameters”E extends MouseEvent<Element, MouseEvent>
Parameters
Section titled “Parameters”handler?
Section titled “handler?”(event) => void
Returns
Section titled “Returns”(event) => void
held:
boolean
Defined in: react/src/heldControl.ts:15
The control’s label is still held: it must not be seen or used yet.
props:
object&Record<string,unknown>
Defined in: react/src/heldControl.ts:23
Spread on the control’s element (merge style with your own, after
it). While held: invisible, keeping its space, and inert — not
focusable, not clickable. On the first paint it carries the
reservation’s failsafe instead of inert, so without JavaScript the
control reveals itself, label and all, and works.
Type Declaration
Section titled “Type Declaration”style?
Section titled “style?”
optionalstyle?:CSSProperties