File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
components/ChannelPreview
contexts/themeContext/utils Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { useChannelPreviewDisplayAvatar } from './hooks/useChannelPreviewDisplay
55import { useChannelPreviewDisplayPresence } from './hooks/useChannelPreviewDisplayPresence' ;
66
77import { ChatContextValue , useChatContext } from '../../contexts/chatContext/ChatContext' ;
8+ import { useTheme } from '../../contexts/themeContext/ThemeContext' ;
89import type { DefaultStreamChatGenerics } from '../../types/types' ;
910import { Avatar } from '../Avatar/Avatar' ;
1011import { GroupAvatar } from '../Avatar/GroupAvatar' ;
@@ -22,6 +23,13 @@ export const ChannelAvatarWithContext = <
2223 props : ChannelAvatarProps < StreamChatGenerics > & Pick < ChatContextValue , 'ImageComponent' > ,
2324) => {
2425 const { channel, ImageComponent } = props ;
26+ const {
27+ theme : {
28+ channelPreview : {
29+ avatar : { size } ,
30+ } ,
31+ } ,
32+ } = useTheme ( ) ;
2533
2634 const displayAvatar = useChannelPreviewDisplayAvatar ( channel ) ;
2735 const displayPresence = useChannelPreviewDisplayPresence ( channel ) ;
@@ -32,7 +40,7 @@ export const ChannelAvatarWithContext = <
3240 ImageComponent = { ImageComponent }
3341 images = { displayAvatar . images }
3442 names = { displayAvatar . names }
35- size = { 40 }
43+ size = { size }
3644 />
3745 ) ;
3846 }
@@ -43,7 +51,7 @@ export const ChannelAvatarWithContext = <
4351 ImageComponent = { ImageComponent }
4452 name = { displayAvatar . name }
4553 online = { displayPresence }
46- size = { 40 }
54+ size = { size }
4755 />
4856 ) ;
4957} ;
Original file line number Diff line number Diff line change @@ -160,6 +160,9 @@ export type Theme = {
160160 maskFillColor ?: ColorValue ;
161161 } ;
162162 channelPreview : {
163+ avatar : {
164+ size : number ;
165+ } ;
163166 checkAllIcon : IconProps ;
164167 checkIcon : IconProps ;
165168 container : ViewStyle ;
@@ -914,6 +917,9 @@ export const defaultTheme: Theme = {
914917 height : 64 ,
915918 } ,
916919 channelPreview : {
920+ avatar : {
921+ size : 40 ,
922+ } ,
917923 checkAllIcon : {
918924 height : DEFAULT_STATUS_ICON_SIZE ,
919925 width : DEFAULT_STATUS_ICON_SIZE ,
You can’t perform that action at this time.
0 commit comments