Skip to content

Commit

Permalink
set default UserIcon params
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoncalves committed Mar 26, 2024
1 parent 0b446e2 commit 93b4d41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 1 addition & 7 deletions src/components/BasicRow/BasicRowWithContact.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { BasicRow, BasicRowProps } from 'components/BasicRow/index'
import { Contact } from 'shared/types'
import { sharedColors } from 'shared/constants'

import UserIcon from '../icons/UserIcon'

Expand All @@ -16,12 +15,7 @@ export const BasicRowWithContact = ({
{...props}
avatar={{
name: contact?.name,
icon: contact ? undefined : (
<UserIcon
backgroundColor={sharedColors.background.secondary}
color={sharedColors.text.label}
/>
),
icon: contact ? undefined : <UserIcon />,
}}
/>
)
6 changes: 4 additions & 2 deletions src/components/icons/UserIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Svg, { Path, Rect, SvgProps } from 'react-native-svg'

import { sharedColors } from 'shared/constants'

interface Props extends SvgProps {
color?: string
backgroundColor?: string
Expand All @@ -8,8 +10,8 @@ interface Props extends SvgProps {
export const UserIcon = ({
width = 44,
height = 46,
color = '#B8B8B8',
backgroundColor = '#252525',
color = sharedColors.text.label,
backgroundColor = sharedColors.background.secondary,
...props
}: Props) => (
<Svg width={width} height={height} viewBox="0 0 32 33" {...props}>
Expand Down

0 comments on commit 93b4d41

Please sign in to comment.