add transparency prop to tab bar (#9336)
This commit is contained in:
@@ -163,7 +163,10 @@ export function MenuButton() {
|
|||||||
shape="square"
|
shape="square"
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
hitSlop={HITSLOP_30}
|
hitSlop={HITSLOP_30}
|
||||||
style={[{marginLeft: -BUTTON_VISUAL_ALIGNMENT_OFFSET}]}>
|
style={[
|
||||||
|
{marginLeft: -BUTTON_VISUAL_ALIGNMENT_OFFSET},
|
||||||
|
a.bg_transparent,
|
||||||
|
]}>
|
||||||
<ButtonIcon icon={Menu} size="lg" />
|
<ButtonIcon icon={Menu} size="lg" />
|
||||||
</Button>
|
</Button>
|
||||||
</Slot>
|
</Slot>
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ export function HomeHeader(
|
|||||||
items={items}
|
items={items}
|
||||||
dragProgress={props.dragProgress}
|
dragProgress={props.dragProgress}
|
||||||
dragState={props.dragState}
|
dragState={props.dragState}
|
||||||
|
transparent
|
||||||
/>
|
/>
|
||||||
</HomeHeaderLayout>
|
</HomeHeaderLayout>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ export function HomeHeaderLayoutMobile({
|
|||||||
style={[
|
style={[
|
||||||
a.justify_center,
|
a.justify_center,
|
||||||
{marginRight: -Layout.BUTTON_VISUAL_ALIGNMENT_OFFSET},
|
{marginRight: -Layout.BUTTON_VISUAL_ALIGNMENT_OFFSET},
|
||||||
|
a.bg_transparent,
|
||||||
]}>
|
]}>
|
||||||
<ButtonIcon icon={FeedsIcon} size="lg" />
|
<ButtonIcon icon={FeedsIcon} size="lg" />
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ export interface TabBarProps {
|
|||||||
onPressSelected?: (index: number) => void
|
onPressSelected?: (index: number) => void
|
||||||
dragProgress: SharedValue<number>
|
dragProgress: SharedValue<number>
|
||||||
dragState: SharedValue<'idle' | 'dragging' | 'settling'>
|
dragState: SharedValue<'idle' | 'dragging' | 'settling'>
|
||||||
|
transparent?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const ITEM_PADDING = 10
|
const ITEM_PADDING = 10
|
||||||
@@ -46,6 +47,7 @@ export function TabBar({
|
|||||||
onPressSelected,
|
onPressSelected,
|
||||||
dragProgress,
|
dragProgress,
|
||||||
dragState,
|
dragState,
|
||||||
|
transparent,
|
||||||
}: TabBarProps) {
|
}: TabBarProps) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
const scrollElRef = useAnimatedRef<ScrollView>()
|
const scrollElRef = useAnimatedRef<ScrollView>()
|
||||||
@@ -313,7 +315,7 @@ export function TabBar({
|
|||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
testID={testID}
|
testID={testID}
|
||||||
style={[t.atoms.bg, a.flex_row]}
|
style={[!transparent && t.atoms.bg, a.flex_row]}
|
||||||
accessibilityRole="tablist">
|
accessibilityRole="tablist">
|
||||||
<BlockDrawerGesture>
|
<BlockDrawerGesture>
|
||||||
<ScrollView
|
<ScrollView
|
||||||
|
|||||||
Reference in New Issue
Block a user