|
@@ -13,9 +13,15 @@ type Props = {
|
|
|
label: string;
|
|
|
rightElement?: ReactNode;
|
|
|
shouldClose?: boolean;
|
|
|
+ textColor?: string;
|
|
|
};
|
|
|
|
|
|
-export const Header: FC<Props> = ({ label, rightElement, shouldClose }) => {
|
|
|
+export const Header: FC<Props> = ({
|
|
|
+ label,
|
|
|
+ rightElement,
|
|
|
+ shouldClose,
|
|
|
+ textColor = Colors.DARK_BLUE
|
|
|
+}) => {
|
|
|
const navigation = useNavigation();
|
|
|
|
|
|
const handlePress = () => {
|
|
@@ -36,9 +42,11 @@ export const Header: FC<Props> = ({ label, rightElement, shouldClose }) => {
|
|
|
return (
|
|
|
<View style={styles.wrapper}>
|
|
|
<TouchableOpacity onPress={handlePress}>
|
|
|
- <View style={styles.chevronWrapper}>{shouldClose ? <CloseSvg /> : <ChevronLeft fill={Colors.DARK_BLUE} />}</View>
|
|
|
+ <View style={styles.chevronWrapper}>
|
|
|
+ {shouldClose ? <CloseSvg /> : <ChevronLeft fill={Colors.DARK_BLUE} />}
|
|
|
+ </View>
|
|
|
</TouchableOpacity>
|
|
|
- <Text style={styles.label}>{label}</Text>
|
|
|
+ <Text style={[styles.label, { color: textColor }]}>{label}</Text>
|
|
|
{rightElement ? <View>{rightElement}</View> : <View style={styles.placeholder} />}
|
|
|
</View>
|
|
|
);
|