diff --git a/src/MessageBox/MessageBox.tsx b/src/MessageBox/MessageBox.tsx index 87a7453..e06dc17 100644 --- a/src/MessageBox/MessageBox.tsx +++ b/src/MessageBox/MessageBox.tsx @@ -48,7 +48,7 @@ const MessageBox: React.FC = ({ focus = false, notch = true, sty return (
- {props.renderAddCmp instanceof Function && props.renderAddCmp()} + {props.renderAddCmp instanceof Function ? props.renderAddCmp() : props.renderAddCmp} {props.type === 'system' ? ( ) : ( diff --git a/src/type.d.ts b/src/type.d.ts index 1520037..e4685dd 100644 --- a/src/type.d.ts +++ b/src/type.d.ts @@ -521,7 +521,7 @@ export interface ISpotifyMessageProps extends ISpotifyMessage {} */ export interface IMessageBoxProps { onMessageFocused?: any - renderAddCmp?: JSX.Element + renderAddCmp?: JSX.Element | (() => JSX.Element) onClick?: React.MouseEventHandler onOpen?: React.MouseEventHandler onPhotoError?: React.MouseEventHandler