Initial commit: expo-popcore project
This commit is contained in:
35
components/bestai/section-header.tsx
Normal file
35
components/bestai/section-header.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import { Pressable, StyleSheet, Text, View } from 'react-native';
|
||||
|
||||
type SectionHeaderProps = {
|
||||
title: string;
|
||||
onPress?: () => void;
|
||||
};
|
||||
|
||||
export function SectionHeader({ title, onPress }: SectionHeaderProps) {
|
||||
if (onPress) {
|
||||
return (
|
||||
<Pressable onPress={onPress} style={styles.container}>
|
||||
<Text style={styles.title}>{title}</Text>
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.title}>{title}</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
marginTop: 28,
|
||||
marginBottom: 18,
|
||||
},
|
||||
title: {
|
||||
fontSize: 18,
|
||||
fontWeight: '800',
|
||||
letterSpacing: 1.2,
|
||||
color: '#F5F8FF',
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user