Matthias Nott
2026-03-07 af1543135d42adc2e97dc5243aeef7418cd3b00d
components/ui/IconButton.tsx
....@@ -1,28 +1,28 @@
11 import React from "react";
22 import { Pressable, Text, ViewStyle } from "react-native";
3
+import { useTheme } from "../../contexts/ThemeContext";
34
45 interface IconButtonProps {
56 onPress: () => void;
67 label: string;
78 size?: number;
89 style?: ViewStyle;
9
- className?: string;
1010 }
1111
1212 export function IconButton({
1313 onPress,
1414 label,
1515 size = 24,
16
- className = "",
1716 }: IconButtonProps) {
17
+ const { colors } = useTheme();
18
+
1819 return (
1920 <Pressable
2021 onPress={onPress}
21
- className={`items-center justify-center ${className}`}
22
- style={{ width: size, height: size }}
22
+ style={{ width: size, height: size, alignItems: "center", justifyContent: "center" }}
2323 hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }}
2424 >
25
- <Text className="text-pai-text-secondary" style={{ fontSize: size * 0.7 }}>
25
+ <Text style={{ color: colors.textSecondary, fontSize: size * 0.7 }}>
2626 {label}
2727 </Text>
2828 </Pressable>