diff options
author | Hailey <me@haileyok.com> | 2024-03-06 11:02:48 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 11:02:48 -0800 |
commit | b8f36a8bca0eab08e09e0a56be63ade40e710f34 (patch) | |
tree | 1f6451f840b46e792e63b6e4d8cb5dd356d5b4c2 /src/view/com/util/Views.web.tsx | |
parent | 7a592d8140cbb907535b482cb43a369b0a7e4750 (diff) | |
download | voidsky-b8f36a8bca0eab08e09e0a56be63ade40e710f34.tar.zst |
Fix double border on web hashtag list (#3091)
* add `topBorder` to Views.tsx * fix double border
Diffstat (limited to 'src/view/com/util/Views.web.tsx')
-rw-r--r-- | src/view/com/util/Views.web.tsx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/view/com/util/Views.web.tsx b/src/view/com/util/Views.web.tsx index db3b9de0d..ae165077c 100644 --- a/src/view/com/util/Views.web.tsx +++ b/src/view/com/util/Views.web.tsx @@ -32,8 +32,11 @@ interface AddedProps { export function CenteredView({ style, sideBorders, + topBorder, ...props -}: React.PropsWithChildren<ViewProps & {sideBorders?: boolean}>) { +}: React.PropsWithChildren< + ViewProps & {sideBorders?: boolean; topBorder?: boolean} +>) { const pal = usePalette('default') const {isMobile} = useWebMediaQueries() if (!isMobile) { @@ -46,6 +49,12 @@ export function CenteredView({ }) style = addStyle(style, pal.border) } + if (topBorder) { + style = addStyle(style, { + borderTopWidth: 1, + }) + style = addStyle(style, pal.border) + } return <View style={style} {...props} /> } |