Open History to see the last commit
1import { Pressable } from "react-native";
2import { AppText } from "./AppText";
3
4export interface MaterialButtonProps {
5 readonly label: string;
6 readonly onPress: () => void;
7 readonly disabled?: boolean;
8 readonly loading?: boolean;
9 readonly tone?: "primary" | "secondary" | "danger" | "text";
10 readonly fullWidth?: boolean;
11}
12
13export function MaterialButton(props: MaterialButtonProps) {
14 return (
15 <Pressable
16 accessibilityRole="button"
17 disabled={props.disabled}
18 onPress={props.onPress}
19 className="min-h-12 justify-center rounded-full bg-secondary px-6"
20 >
21 <AppText>{props.label}</AppText>
22 </Pressable>
23 );
24}