Utilities
- ToggleGroupUtils: Utilities related to primitives with a toggle group.
- EmptyGestureResponderEvent: Used for calling
onPress
andonLongPress
without any arguments for accessibility purposes.
component. -->
A collection of utilities for core primitives.
Utilities
onPress
and onLongPress
without any arguments for accessibility purposes.Copy/paste the following code to ~/components/primitives/utils.tsx
getIsSelected
: Returns true if the item is selected.getNewSingleValue
: Returns the new value for a single toggle group.getNewMultipleValue
: Returns the new value for a multiple toggle group.