Allow Button component to not have button-block class

This needs a better solution for configuring the button's CSS classes,
but this works for now.
This commit is contained in:
Sam Atkins 2024-05-09 12:37:22 +01:00
parent 05aaa5b667
commit df3f7e9a6e

View File

@ -39,8 +39,9 @@ export default class Button extends Component {
`);
return;
}
// TODO: Replace hack for 'small' with a better way to configure button classes.
$(template).html(/*html*/`
<button type="submit" class="button button-block button-${this.get('style')}" style="margin-top:10px;" disabled>${
<button type="submit" class="button ${this.get('style') !== 'small' ? 'button-block' : ''} button-${this.get('style')}" style="margin-top:10px;" disabled>${
html_encode(this.get('label'))
}</button>
`);