Chip
Etiqueta compacta para filtros, selecciones y elementos eliminables.
Uso
import {Tag} from 'lucide-react-native';
import {Chip} from 'rn-inkpad';
<Chip text="iOS" selected onPress={() => {}} />
<Chip text="Removable" icon={Tag} variant="outlined" onClose={() => {}} />
<Chip text="Disabled" disabled />
Props
| Nombre | Tipo | Por defecto | Descripción |
|---|---|---|---|
| text | string | Label. | |
| icon | IconProp | Leading icon. | |
| selected | boolean | false | Selected state. |
| disabled | boolean | false | Disables presses and greys the chip. |
| variant | 'filled' | 'outlined' | filled | Visual style. |
| color | string | theme primary | Chip color. |
| textColor | string | Overrides the computed text color. | |
| size | 'sm' | 'md' | md | Size. |
| closeIcon | IconProp | built-in cross | Icon of the close button. |
| onPress | () => void | Press handler. Without it the chip is not pressable. | |
| onClose | () => void | Renders a close button and handles its press. | |
| style | StyleProp<ViewStyle> | Container style. | |
| textStyle | StyleProp<TextStyle> | Label style. |