Skip to content

Commit

Permalink
Merge pull request #68 from prsaroha/send-button-prop
Browse files Browse the repository at this point in the history
feat(composer): add optional sendButton prop
  • Loading branch information
phatv authored Mar 22, 2021
2 parents 6697ff2 + 5942e70 commit d775e44
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/MessageComposer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const MessageComposer = ({
placeholder,
onError,
keyBindings,
sendButton
}) => {
const emitter = useRef(new TinyEmitter());
const [active, setActive] = useState({});
Expand Down Expand Up @@ -57,6 +58,7 @@ const MessageComposer = ({
onError={onError}
keyBindings={keyBindings}
/>
{sendButton}
</div>
<div className="children">{children}</div>
</div>
Expand Down Expand Up @@ -86,6 +88,7 @@ MessageComposer.propTypes = {
onError: PropTypes.func,
placeholder: PropTypes.string,
send: PropTypes.func,
sendButton: PropTypes.object,
setEmitter: PropTypes.func,
Toolbar: PropTypes.func,
};
Expand All @@ -103,6 +106,7 @@ MessageComposer.defaultProps = {
onError: undefined,
placeholder: '',
send: undefined,
sendButton: undefined,
setEmitter: () => {},
Toolbar: CreateToolbar,
};
Expand Down

0 comments on commit d775e44

Please sign in to comment.