refactor: restructure

monorepo with apps/ and services/
  directories
This commit is contained in:
Wuesteon 2025-11-26 03:03:24 +01:00
parent 25824ed0ac
commit ff80aeec1f
4062 changed files with 2592 additions and 1278 deletions

View file

@ -0,0 +1,47 @@
import React from 'react';
import { Pressable, ViewStyle, PressableProps } from 'react-native';
import { Icon } from '../../ui/Icon';
export type HeaderButtonProps = {
/** Icon name */
icon: string;
/** Press handler */
onPress: () => void;
/** Icon size */
size?: number;
/** Icon color */
iconColor?: string;
/** Button is disabled */
disabled?: boolean;
/** Additional styles */
style?: ViewStyle;
/** Hit slop for better touch target */
hitSlop?: PressableProps['hitSlop'];
};
export function HeaderButton({
icon,
onPress,
size = 24,
iconColor = '#6B7280',
disabled = false,
style,
hitSlop = { top: 10, bottom: 10, left: 10, right: 10 },
}: HeaderButtonProps) {
return (
<Pressable
onPress={onPress}
disabled={disabled}
hitSlop={hitSlop}
style={({ pressed }) => [
{
padding: 8,
opacity: disabled ? 0.4 : pressed ? 0.7 : 1,
},
style,
]}
>
<Icon name={icon} size={size} color={iconColor} />
</Pressable>
);
}