Skip to content

Commit

Permalink
[🐴] Tweak header styles (#4053)
Browse files Browse the repository at this point in the history
* Tweak desktop header styles

* Tweak mobile

* Bump icon size

* Remove unused else
  • Loading branch information
estrattonbailey authored May 16, 2024
1 parent 72550df commit 3a8baba
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ export function Button({
baseStyles.push({height: 50, width: 50})
}
} else if (size === 'small') {
baseStyles.push({height: 40, width: 40})
baseStyles.push({height: 34, width: 34})
} else if (size === 'tiny') {
baseStyles.push({height: 20, width: 20})
}
Expand Down
30 changes: 17 additions & 13 deletions src/screens/Messages/List/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,16 @@ export function MessagesScreen({navigation, route}: Props) {
return (
<Link
to="/messages/settings"
accessibilityLabel={_(msg`Message settings`)}
accessibilityHint={_(msg`Opens the message settings page`)}>
<SettingsSlider size="lg" style={t.atoms.text} />
label={_(msg`Chat settings`)}
size="small"
variant="ghost"
color="secondary"
shape="square"
style={[a.justify_center]}>
<SettingsSlider size="md" style={[t.atoms.text_contrast_medium]} />
</Link>
)
}, [_, t.atoms.text])
}, [_, t])

const initialNumToRender = useInitialNumToRender()
const [isPTRing, setIsPTRing] = useState(false)
Expand Down Expand Up @@ -165,7 +169,7 @@ export function MessagesScreen({navigation, route}: Props) {
<ViewHeader
title={_(msg`Messages`)}
renderButton={renderButton}
showBorder={false}
showBorder
canGoBack={false}
/>
)}
Expand Down Expand Up @@ -225,32 +229,32 @@ function DesktopHeader({
a.justify_between,
a.gap_lg,
a.px_lg,
a.py_sm,
a.pr_md,
a.py_md,
a.border_b,
t.atoms.border_contrast_low,
]}>
<Text style={[a.text_2xl, a.font_bold]}>
<Trans>Messages</Trans>
</Text>
<View style={[a.flex_row, a.align_center, a.gap_md]}>
<View style={[a.flex_row, a.align_center, a.gap_sm]}>
<Button
label={_(msg`Message settings`)}
color="secondary"
size="large"
size="small"
variant="ghost"
style={[{height: 'auto', width: 'auto'}, a.px_sm, a.py_sm]}
shape="square"
onPress={onNavigateToSettings}>
<ButtonIcon icon={SettingsSlider} />
<SettingsSlider size="md" style={[t.atoms.text_contrast_medium]} />
</Button>
{gtTablet && (
<Button
label={_(msg`New chat`)}
color="primary"
size="large"
size="small"
variant="solid"
style={[{height: 'auto', width: 'auto'}, a.px_md, a.py_sm]}
onPress={newChatControl.open}>
<ButtonIcon icon={Plus} position="right" />
<ButtonIcon icon={Plus} position="left" />
<ButtonText>
<Trans>New chat</Trans>
</ButtonText>
Expand Down

0 comments on commit 3a8baba

Please sign in to comment.