3.1.0 • Published 4 years ago
@primitives/checkbox v3.1.0
Button is an element that receives pointer-like interactions. It can't be styled at all: it is designed to simply get out of the way and provide handlers for the interaction in the area covered by its children.
Hover-like handlers
onPointerEnter: triggered when the pointer goes above the area of the componentonPointerLeave: triggered when the pointer goes out of the area of the component
These map to Web only:
onPointerEnter->onMouseEnteronPointerLeave->onMouseLeave
React Native does not currently support hover-like actions.
Press-like handlers
onToggle: triggered when a complete press action is done on the componentonPressIn: triggered when the component is being pressedonPressOut: triggered when the component stops being pressed
In Web:
onToggle->onClickonPressIn->onMouseDownonPressOut->onMouseUp
In Native:
onToggle->onValueChangeonPressIn->onPressInonPressOut->onPressOut
Focus-like handlers
onFocus: triggered when the component gets the focusonBlur: triggered when the component looses the focus
These map to Web only:
onFocus->onFocusonBlur->onBlur
React Native does not currently support focus-like actions on Touchable components.
Raw type definitions
export type TIsHoveredHandlers = {
onPointerEnter?: () => void,
onPointerLeave?: () => void
}
export type TIsPressedHandlers = {
onPressIn?: () => void,
onPressOut?: () => void
}
export type TIsFocusedHandlers = {
onFocus?: () => void
onBlur?: () => void
}
export type TButtonProps = {
id?: string,
accessibilityLabel?: string,
isDisabled?: boolean,
shouldStretch?: boolean,
onToggle?: () => void
} & TIsHoveredHandlers & TIsPressedHandlers & TIsFocusedHandlers3.1.0
4 years ago
3.0.1
5 years ago
3.0.0
5 years ago
2.0.3
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
6 years ago
1.0.0
6 years ago
0.6.0
6 years ago
0.5.1
6 years ago
0.5.0
6 years ago
0.4.1
6 years ago
0.4.0
6 years ago
0.3.0
6 years ago
0.2.0
6 years ago
0.1.3
7 years ago
0.1.2
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago