PrimaryButton
Un botón primario que cuenta con un indicador de actividad.
Uso
import React from "react";
import { View, Text } from "react-native";
import { PrimaryButton, Theme } from "@ga-innoval/react-native-ui";
export function Component() {
return (
<PrimaryButton
onPress={() => console.log("pressed!")}
backgroundColor={colors.success}
text="Aceptar"
loading={false}
style={{ marginBottom: 10 }}
/>
);
}
Props
text
Texto a mostrarse dentro del botón.
Type | Optional |
---|---|
string | No |
onPress
Función a ejecutarse al presionar.
Type | Optional |
---|---|
() => void | No |
backgroundColor?
Color del botón.
Type | Optional | Default |
---|---|---|
ColorValue | Yes | #232222 |
loading
Estilos personalizados para el botón.
Type | Optional |
---|---|
boolean | No |
Pressable Props
Este componente incluye todas las propiedades del componente Pressable.