mirror of
https://github.com/DocNR/POWR.git
synced 2025-04-19 19:01:18 +00:00
19 lines
552 B
TypeScript
19 lines
552 B
TypeScript
// components/Header.tsx
|
|
import React from 'react';
|
|
import { View } from 'react-native';
|
|
import { Text } from '@/components/ui/text';
|
|
import { ThemeToggle } from '@/components/ThemeToggle';
|
|
|
|
interface HeaderProps {
|
|
title: string;
|
|
rightElement?: React.ReactNode;
|
|
}
|
|
|
|
export default function Header({ title, rightElement }: HeaderProps) {
|
|
return (
|
|
<View className="flex-row justify-between items-center px-4 pt-14 pb-4 bg-card">
|
|
<Text className="text-2xl font-bold">{title}</Text>
|
|
{rightElement || <ThemeToggle />}
|
|
</View>
|
|
);
|
|
} |