mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 02:39:40 +02:00
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>
41 lines
1.2 KiB
TypeScript
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>
|
|
);
|
|
}
|