1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Align back button

This commit is contained in:
Zhiyuan Zheng
2020-12-13 23:38:37 +01:00
parent c1076b8e94
commit 991741488d
7 changed files with 100 additions and 40 deletions

View File

@ -15,14 +15,23 @@ const HeaderLeft: React.FC<Props> = ({ onPress, text, icon }) => {
const { theme } = useTheme()
return (
<Pressable onPress={onPress} style={styles.base}>
<Pressable
onPress={onPress}
style={[
styles.base,
{
backgroundColor: theme.backgroundGradientStart,
...(icon && { height: 44, width: 44 })
}
]}
>
{text ? (
<Text style={[styles.text, { color: theme.primary }]}>{text}</Text>
) : (
<Feather
name={icon || 'chevron-left'}
color={theme.primary}
size={StyleConstants.Font.Size.L}
size={StyleConstants.Spacing.L}
/>
)}
</Pressable>
@ -31,7 +40,10 @@ const HeaderLeft: React.FC<Props> = ({ onPress, text, icon }) => {
const styles = StyleSheet.create({
base: {
paddingRight: StyleConstants.Spacing.S
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
borderRadius: 100
},
text: {
fontSize: StyleConstants.Font.Size.M