Fix double border on web hashtag list (#3091)
* add `topBorder` to Views.tsx * fix double border
This commit is contained in:
parent
7a592d8140
commit
b8f36a8bca
4 changed files with 23 additions and 12 deletions
4
src/view/com/util/Views.d.ts
vendored
4
src/view/com/util/Views.d.ts
vendored
|
@ -5,4 +5,6 @@ export function CenteredView({
|
|||
style,
|
||||
sideBorders,
|
||||
...props
|
||||
}: React.PropsWithChildren<ViewProps & {sideBorders?: boolean}>)
|
||||
}: React.PropsWithChildren<
|
||||
ViewProps & {sideBorders?: boolean; topBorder?: boolean}
|
||||
>)
|
||||
|
|
|
@ -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} />
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue