Skip to content

Commit 940956b

Browse files
committed
fix: avatar typing
1 parent 2877e02 commit 940956b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/components/composites/Avatar/types.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import type { InterfaceBoxProps } from '../../primitives/Box';
22
import type { IImageProps } from '../../primitives/Image';
33
import type { ImageSourcePropType } from 'react-native';
44
import type { MutableRefObject } from 'react';
5-
import type { CustomProps, ResponsiveValue } from '../../../components/types';
6-
import type { ISizes } from '../../../theme/base/sizes';
7-
5+
import type { CustomProps } from '../../../components/types';
6+
import type { ThemeComponentSizeType } from '../../../components/types/utils';
87
export interface InterfaceAvatarProps extends InterfaceBoxProps<IAvatarProps> {
98
/**
109
* The image source of the avatar.
@@ -14,11 +13,11 @@ export interface InterfaceAvatarProps extends InterfaceBoxProps<IAvatarProps> {
1413
* The size of the avatar
1514
* @default md
1615
*/
17-
size?: ResponsiveValue<ISizes | (string & {}) | number>;
16+
size?: ThemeComponentSizeType<'Avatar'>;
1817
/**
1918
* For providing props to Image component inside Avatar
2019
*/
21-
_image?: IImageProps;
20+
_image?: Partial<IImageProps>;
2221
/**
2322
* ref to be attached to Avatar wrapper
2423
*/
@@ -50,11 +49,11 @@ export interface IAvatarGroupProps extends IAvatarProps {
5049
/**
5150
* For providing props to all Avatar in that Avatar.Group
5251
*/
53-
_avatar?: IAvatarProps;
52+
_avatar?: Partial<IAvatarProps>;
5453
/**
5554
* For providing props to the Avatar that shows the count of remaining Avatars that are not visible when max is applied.
5655
*/
57-
_hiddenAvatarPlaceholder?: IAvatarProps;
56+
_hiddenAvatarPlaceholder?: Partial<IAvatarProps>;
5857
}
5958

6059
export type IAvatarComponentType = ((

0 commit comments

Comments
 (0)