ChipButton
Un pequeño botón estilo chip que se ajusta al ancho del contenido.
Uso
import React from "react";
import { View, Text } from "react-native";
import { ChipButton } from "@ga-innoval/react-native-ui";
export function Component() {
return (
<ChipButton
text="Click me!"
backgroundColor={"green"}
onPress={() => console.log("Clicked!")}
icon="alert"
/>
);
}
Props
text
Type: string
Texto a mostrarse dentro del botón.
onPress
Type: () => void
Función a ejecutarse al presionar.
backgroundColor
Type: ColorValue
Color del botón.
icon?
Type: IconName
Nombre del icono a mostrar (react-native-vector-icons).
containerStyle?
Type: ViewStyle
Estilos personalizados para el botón.