Merge pull request #5385 from matrix-org/travis/msc-send-widget-events

Add new widget API actions for changing rooms and sending/receiving events
This commit is contained in:
Travis Ralston 2020-11-20 09:17:18 -07:00 committed by GitHub
commit 5f47077a30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 835 additions and 15 deletions

View file

@ -54,6 +54,9 @@ export default class DialogButtons extends React.Component {
// disables only the primary button
primaryDisabled: PropTypes.bool,
// something to stick next to the buttons, optionally
additive: PropTypes.element,
};
static defaultProps = {
@ -85,8 +88,14 @@ export default class DialogButtons extends React.Component {
</button>;
}
let additive = null;
if (this.props.additive) {
additive = <div className="mx_Dialog_buttons_additive">{this.props.additive}</div>;
}
return (
<div className="mx_Dialog_buttons">
{ additive }
{ cancelButton }
{ this.props.children }
<button type={this.props.primaryIsSubmit ? 'submit' : 'button'}