Open History to see the last commit
1import { Pressable } from "react-native";
2
3import { SymbolView, type AppSymbolName } from "./AppSymbol";
4
5export function MaterialIconButton(props: {
6 readonly accessibilityLabel: string;
7 readonly icon: AppSymbolName;
8 readonly onPress?: () => void;
9 readonly disabled?: boolean;
10 readonly selected?: boolean;
11 readonly variant?: "standard" | "primary" | "tonal" | "danger";
12}) {
13 return (
14 <Pressable
15 {...props}
16 accessibilityRole="button"
17 accessibilityState={{ disabled: Boolean(props.disabled), selected: props.selected }}
18 className="size-12 items-center justify-center"
19 >
20 <SymbolView name={props.icon} size={24} tintColorClassName="accent-foreground" />
21 </Pressable>
22 );
23}