Moved later/gitgram-ai/gitgram/ to apps/ritgram/ (fresh history; full history stays in caelum0x/gitgram). AITimeMachine stays separate in later/gitgram-ai per the Rithub master plan. Logs, pid files and env files are ignored; GPL-3.0 mobile/proximity noted in THIRD_PARTY_NOTICES. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
40 lines
966 B
TypeScript
40 lines
966 B
TypeScript
import React, { useContext } from 'react';
|
|
import { StyleSheet, Text, View } from 'react-native';
|
|
import { Typography } from '@app/theme';
|
|
import { AppContext } from '@app/context';
|
|
import { ThemeColors } from '@app/types/theme';
|
|
|
|
const { FontWeights, FontSizes } = Typography;
|
|
|
|
interface HeaderProps {
|
|
title: string,
|
|
IconRight?: React.FC
|
|
};
|
|
|
|
const Header: React.FC<HeaderProps> = ({ title, IconRight }) => {
|
|
|
|
const { theme } = useContext(AppContext);
|
|
return (
|
|
<View style={styles(theme).container}>
|
|
<Text style={styles(theme).title}>{title}</Text>
|
|
{IconRight && <IconRight />}
|
|
</View>
|
|
);
|
|
};
|
|
|
|
const styles = (theme = {} as ThemeColors) => StyleSheet.create({
|
|
container: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
justifyContent: 'space-between',
|
|
paddingVertical: 10,
|
|
paddingHorizontal: 20
|
|
},
|
|
title: {
|
|
...FontWeights.Bold,
|
|
...FontSizes.Heading,
|
|
color: theme.text01
|
|
}
|
|
});
|
|
|
|
export default Header; |