-
Notifications
You must be signed in to change notification settings - Fork 3k
/
Copy pathMoneyRequestHeaderStatusBar.tsx
34 lines (28 loc) · 1.23 KB
/
MoneyRequestHeaderStatusBar.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import React from 'react';
import {View} from 'react-native';
import useThemeStyles from '@hooks/useThemeStyles';
import Text from './Text';
type MoneyRequestHeaderStatusBarProps = {
/** Title displayed in badge */
title: string;
/** Banner Description */
description: string;
/** Whether we show the border bottom */
shouldShowBorderBottom: boolean;
};
function MoneyRequestHeaderStatusBar({title, description, shouldShowBorderBottom}: MoneyRequestHeaderStatusBarProps) {
const styles = useThemeStyles();
const borderBottomStyle = shouldShowBorderBottom ? styles.borderBottom : {};
return (
<View style={[styles.dFlex, styles.flexRow, styles.alignItemsCenter, styles.flexGrow1, styles.overflowHidden, styles.ph5, styles.pb3, borderBottomStyle]}>
<View style={[styles.moneyRequestHeaderStatusBarBadge]}>
<Text style={[styles.textStrong, styles.textMicroBold]}>{title}</Text>
</View>
<View style={[styles.flexShrink1]}>
<Text style={[styles.textLabelSupporting]}>{description}</Text>
</View>
</View>
);
}
MoneyRequestHeaderStatusBar.displayName = 'MoneyRequestHeaderStatusBar';
export default MoneyRequestHeaderStatusBar;