diff options
author | Minseo Lee <itoupluk427@gmail.com> | 2024-03-07 11:19:50 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-07 11:19:50 +0900 |
commit | e74c46e9ab480959c4416f83a78289e460bdeec7 (patch) | |
tree | c770265051354782bb6e779905e0351cc8f8abd9 /src/view/com/util/Views.web.tsx | |
parent | f3db23a3b14e9444cb499c727b9d62c414e5a840 (diff) | |
parent | 8b0e575f6423575c08e9a6748be41c888611d631 (diff) | |
download | voidsky-e74c46e9ab480959c4416f83a78289e460bdeec7.tar.zst |
Merge branch 'main' into patch-3
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} /> } |