ButtonClickable()function

ButtonClickable({
	onClick,
	disabled = !onClick,
	title,
	children = "Click",
	className,
}: StylableClickableProps): ReactElement
ParamType
propsStylableClickableProps
Props for a clickable that also accepts a className for styling. required
    .classNamestring
Return
ReactElement

Render a <button> element that runs its onClick handler through a BusyStore and shows a loading spinner while busy.

  • Notifies the user of the handler's returned value (success) or thrown value (error).
  • Disabled and ignores clicks while a previous click is still pending.

Examples

<ButtonClickable onClick={save} className="btn">Save</ButtonClickable>