From f8b2efa72828b195a6f5be0c999b10b69dd28d11 Mon Sep 17 00:00:00 2001 From: Dita Aji Pratama Date: Sat, 18 Apr 2026 12:20:41 +0700 Subject: [PATCH] feat: create Header component - Add Header component with title prop - Style with primary color background - Learn: React.FC, interface props, StyleSheet --- components/Header.tsx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 components/Header.tsx diff --git a/components/Header.tsx b/components/Header.tsx new file mode 100644 index 0000000..604fe83 --- /dev/null +++ b/components/Header.tsx @@ -0,0 +1,29 @@ +import React from 'react'; +import { View, Text, StyleSheet } from 'react-native'; +import { COLORS, FONTS } from '../constants/theme'; + +interface HeaderProps { + title: string; +} + +export const Header: React.FC = ({ title }) => { + return ( + + {title} + + ); +}; + +const styles = StyleSheet.create({ + container: { + backgroundColor: COLORS.primary, + padding: 20, + paddingTop: 50, + alignItems: 'center', + }, + title: { + fontSize: FONTS.large, + fontWeight: 'bold', + color: COLORS.card, + }, +}); \ No newline at end of file