Skip to content

Commit

Permalink
Merge pull request #189 from NelsonYong/master
Browse files Browse the repository at this point in the history
fix: MessageBox renderAddCmp
  • Loading branch information
emregudur authored Apr 10, 2023
2 parents b8eeacf + d85ad8c commit d5f3d44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/MessageBox/MessageBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const MessageBox: React.FC<MessageBoxType> = ({ focus = false, notch = true, sty

return (
<div ref={messageRef} className={classNames('rce-container-mbox', props.className)} onClick={props.onClick}>
{props.renderAddCmp instanceof Function && props.renderAddCmp()}
{props.renderAddCmp instanceof Function ? props.renderAddCmp() : props.renderAddCmp}
{props.type === 'system' ? (
<SystemMessage {...props} focus={focus} notch={notch} />
) : (
Expand Down
2 changes: 1 addition & 1 deletion src/type.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d5f3d44

Please sign in to comment.