Saltar al contenido principal

PrimaryButton

Un botón primario que cuenta con un indicador de actividad.

Docusaurus logo

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.

TypeOptional
stringNo

onPress

Función a ejecutarse al presionar.

TypeOptional
() => voidNo

backgroundColor?

Color del botón.

TypeOptionalDefault
ColorValueYes#232222

loading

Estilos personalizados para el botón.

TypeOptional
booleanNo

Pressable Props

Este componente incluye todas las propiedades del componente Pressable.