import React from 'react' import type { CheckboxProps as CheckboxHeadlessProps } from '@tamagui/checkbox-headless' import { useCheckbox } from '@tamagui/checkbox-headless' import { Check, Minus } from '@tamagui/lucide-icons-2' import type { View } from 'react-native' import { Pressable } from 'react-native' import { Label, XStack, YStack } from 'tamagui' export function CheckboxHeadlessDemo() { return ( ) } const HeadlessCheckbox = React.forwardRef((props, ref) => { const [checked, setChecked] = React.useState(props.defaultChecked || false) const { checkboxProps, checkboxRef, bubbleInput } = useCheckbox( props, [checked, setChecked], ref ) return ( {checked === 'indeterminate' && } {checked === true && } {bubbleInput} ) })