feat(toolbar-buttons): Add event for notify overwritten toolbar buttons

This commit is contained in:
Horatiu Muresan
2021-09-14 10:07:20 +03:00
parent dbecd8cdb2
commit ae3d8faf70
38 changed files with 382 additions and 71 deletions

View File

@@ -18,11 +18,6 @@ type Props = AbstractButtonProps & {
* Whether or not the chat feature is currently displayed.
*/
_chatOpen: boolean,
/**
* External handler for click action.
*/
handleClick: Function
};
/**
@@ -61,7 +56,13 @@ class ChatButton extends AbstractButton<Props, *> {
* @returns {void}
*/
_handleClick() {
this.props.handleClick();
const { handleClick } = this.props;
if (handleClick) {
handleClick();
return;
}
}
/**