Fix double border on web hashtag list (#3091)
* add `topBorder` to Views.tsx * fix double border
This commit is contained in:
Vendored
+3
-1
@@ -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} />
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user