File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ export type PollProps<
2929> = Pick < PollContextValue < StreamChatGenerics > , 'poll' | 'message' > &
3030 Pick < MessagesContextValue < StreamChatGenerics > , 'PollContent' > ;
3131
32+ export type PollContentProps = {
33+ PollButtons ?: React . ComponentType ;
34+ PollHeader ?: React . ComponentType ;
35+ } ;
36+
3237export const PollButtons = ( ) => (
3338 < >
3439 < ShowAllOptionsButton />
@@ -72,10 +77,7 @@ export const PollHeader = () => {
7277export const PollContent = ( {
7378 PollButtons : PollButtonsOverride ,
7479 PollHeader : PollHeaderOverride ,
75- } : {
76- PollButtons ?: React . ComponentType ;
77- PollHeader ?: React . ComponentType ;
78- } ) => {
80+ } : PollContentProps ) => {
7981 const { options } = usePollState ( ) ;
8082
8183 const {
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import { useMessageDetailsForState } from './hooks/useMessageDetailsForState';
2929
3030import { isUploadAllowed , MAX_FILE_SIZE_TO_UPLOAD , prettifyFileSize } from './utils/utils' ;
3131
32+ import { PollContentProps } from '../../components' ;
3233import { AudioAttachmentProps } from '../../components/Attachment/AudioAttachment' ;
3334import { parseLinksFromText } from '../../components/Message/MessageSimple/utils/parseLinks' ;
3435import type { AttachButtonProps } from '../../components/MessageInput/AttachButton' ;
@@ -413,7 +414,7 @@ export type InputMessageInputContextValue<
413414 */
414415 compressImageQuality ?: number ;
415416
416- CreatePollContent ?: React . ComponentType ;
417+ CreatePollContent ?: React . ComponentType < PollContentProps > ;
417418
418419 /**
419420 * Override file upload request
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import type { TouchableOpacityProps } from 'react-native';
44
55import type { Attachment , ChannelState , MessageResponse } from 'stream-chat' ;
66
7+ import { PollContentProps } from '../../components' ;
78import type { AttachmentProps } from '../../components/Attachment/Attachment' ;
89import type { AttachmentActionsProps } from '../../components/Attachment/AttachmentActions' ;
910import type { AudioAttachmentProps } from '../../components/Attachment/AudioAttachment' ;
@@ -509,7 +510,7 @@ export type MessagesContextValue<
509510 * ```
510511 */
511512 onPressMessage ?: ( payload : MessageTouchableHandlerPayload < StreamChatGenerics > ) => void ;
512- PollContent ?: React . ComponentType ;
513+ PollContent ?: React . ComponentType < PollContentProps > ;
513514 /**
514515 * Full override of the reaction function on Message and Message Overlay
515516 *
You can’t perform that action at this time.
0 commit comments