managarten/manadeck/apps/mobile/components/ui/PageHeader.tsx
Till-JS e7f5f942f3 chore: initial commit - consolidate 4 projects into monorepo
Projects included:
- maerchenzauber (NestJS backend + Expo mobile + SvelteKit web + Astro landing)
- manacore (Expo mobile + SvelteKit web + Astro landing)
- manadeck (NestJS backend + Expo mobile + SvelteKit web)
- memoro (Expo mobile + SvelteKit web + Astro landing)

This commit preserves the current state before monorepo restructuring.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 23:38:24 +01:00

41 lines
1.2 KiB
TypeScript

import React from 'react';
import { View, Platform } from 'react-native';
import { Text } from './Text';
import { useThemeColors } from '~/utils/themeUtils';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { spacing } from '~/utils/spacing';
interface PageHeaderProps {
title: string;
withHorizontalPadding?: boolean;
}
export function PageHeader({ title, withHorizontalPadding = true }: PageHeaderProps) {
const colors = useThemeColors();
const insets = useSafeAreaInsets();
return (
<View
style={{
paddingTop: Platform.OS === 'ios' ? insets.top + spacing.lg : spacing.lg,
paddingHorizontal: withHorizontalPadding ? spacing.container.horizontal : 0,
paddingBottom: spacing.lg,
backgroundColor: colors.background,
borderBottomWidth: 1,
borderBottomColor: colors.border,
}}>
<View style={{ paddingHorizontal: withHorizontalPadding ? 0 : spacing.container.horizontal }}>
<Text
style={{
fontSize: 28,
fontWeight: '700',
color: colors.foreground,
letterSpacing: 0.3,
lineHeight: 34,
}}>
{title}
</Text>
</View>
</View>
);
}