dashboard
repositories
activity
search
login
APPS
/
PAILot
summary
reflog
commits
tree
compare
forks
blame
|
history
|
raw
|
HEAD
feat: dual address auto-switch, custom icon, notifications, image support
Matthias Nott
2026-03-07
af1543135d42adc2e97dc5243aeef7418cd3b00d
[APPS/PAILot.git]
/
components
/
ui
/
IconButton.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import React from "react";
import { Pressable, Text, ViewStyle } from "react-native";
import { useTheme } from "../../contexts/ThemeContext";
interface IconButtonProps {
onPress: () => void;
label: string;
size?: number;
style?: ViewStyle;
}
export function IconButton({
onPress,
label,
size = 24,
}: IconButtonProps) {
const { colors } = useTheme();
return (
<Pressable
onPress={onPress}
style={{ width: size, height: size, alignItems: "center", justifyContent: "center" }}
hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }}
>
<Text style={{ color: colors.textSecondary, fontSize: size * 0.7 }}>
{label}
</Text>
</Pressable>
);
}