diff --git a/packages/components/src/topbar/topbar.tsx b/packages/components/src/topbar/topbar.tsx index b5b69746..2ff43c8b 100644 --- a/packages/components/src/topbar/topbar.tsx +++ b/packages/components/src/topbar/topbar.tsx @@ -16,34 +16,20 @@ import { BlurView } from 'expo-blur' import { DropdownMenu } from '../dropdown-menu' -import type { GetProps, StackProps } from '@tamagui/core' - -type BaseProps = GetProps +import type { Channel } from '../sidebar/mock-data' type Props = { membersVisisble: boolean onMembersPress: () => void goBack?: () => void - title?: string - description?: string - icon?: React.ReactNode - refForScroll?: React.RefObject - backgroundColor?: StackProps['backgroundColor'] - isBlurred?: boolean -} & BaseProps + channel: Channel + blur?: boolean +} const Topbar = (props: Props) => { - const { - membersVisisble, - onMembersPress, - goBack, - title, - description, - icon, - backgroundColor, - isBlurred, - ...rest - } = props + const { membersVisisble, onMembersPress, goBack, blur, channel } = props + + const { title, description, icon } = channel return ( @@ -53,18 +39,17 @@ const Topbar = (props: Props) => { alignItems="center" justifyContent="space-between" padding={16} - backgroundColor={backgroundColor || '$background'} + backgroundColor={'$blurBackground'} borderBottomWidth={1} - borderColor={isBlurred ? 'transparent' : '$neutral-80-opa-10'} + borderColor={blur ? 'transparent' : '$neutral-80-opa-10'} width="100%" - {...rest} > } onPress={() => goBack?.()} - blurred={isBlurred} + blurred={blur} /> @@ -109,9 +94,10 @@ const Topbar = (props: Props) => { icon={} selected={membersVisisble} onPress={onMembersPress} - blurred={isBlurred} + blurred={blur} /> + } />