File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
package/src/components/ChannelPreview Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,12 @@ import { GroupAvatar } from '../Avatar/GroupAvatar';
1212
1313export type ChannelAvatarProps <
1414 StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics ,
15- > = Pick < ChannelPreviewProps < StreamChatGenerics > , 'channel' > ;
15+ > = Pick < ChannelPreviewProps < StreamChatGenerics > , 'channel' > & {
16+ /**
17+ * The size of the avatar.
18+ */
19+ size ?: number ;
20+ } ;
1621
1722/**
1823 * This UI component displays an avatar for a particular channel.
@@ -22,15 +27,17 @@ export const ChannelAvatarWithContext = <
2227> (
2328 props : ChannelAvatarProps < StreamChatGenerics > & Pick < ChatContextValue , 'ImageComponent' > ,
2429) => {
25- const { channel, ImageComponent } = props ;
30+ const { channel, ImageComponent, size : propSize } = props ;
2631 const {
2732 theme : {
2833 channelPreview : {
29- avatar : { size } ,
34+ avatar : { size : themeSize } ,
3035 } ,
3136 } ,
3237 } = useTheme ( ) ;
3338
39+ const size = propSize || themeSize ;
40+
3441 const displayAvatar = useChannelPreviewDisplayAvatar ( channel ) ;
3542 const displayPresence = useChannelPreviewDisplayPresence ( channel ) ;
3643
You can’t perform that action at this time.
0 commit comments