1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-21 22:29:41 +02:00

Provide options for UI buttons to expand to fill parent

This commit is contained in:
sauls8t 2019-01-23 15:44:46 +00:00
parent 6126d4dd5d
commit 6c71a1f18d
2 changed files with 11 additions and 3 deletions

View file

@ -17,15 +17,15 @@ export default Component.extend({
classNames: [], classNames: [],
classNameBindings: ['calcClass'], classNameBindings: ['calcClass'],
attributeBindings: ['calcAttrs:data-dismiss', 'submitAttrs:type'], attributeBindings: ['calcAttrs:data-dismiss', 'submitAttrs:type'],
label: '', label: '',
icon: '', icon: '',
color: '', color: '',
light: false, light: false,
themed: false, themed: false,
dismiss: false, dismiss: false,
truncate: false,
stretch: false,
uppercase: true, uppercase: true,
iconClass: '', iconClass: '',
hasIcon: computed('iconClass', function() { hasIcon: computed('iconClass', function() {
return this.iconClass.trim() != ''; return this.iconClass.trim() != '';
@ -52,6 +52,14 @@ export default Component.extend({
bc += ' text-case-normal'; bc += ' text-case-normal';
} }
if (this.truncate) {
bc += ' text-truncate';
}
if (this.stretch) {
bc += ' max-width-100 text-left';
}
return bc; return bc;
}), }),

View file

@ -1,5 +1,5 @@
{{#if hasIcon}} {{#if hasIcon}}
<i class="dicon {{iconClass}}"/> <i class="dicon {{iconClass}}"/>
{{/if}} {{/if}}
<div class="label">{{label}}</div> <div class="label" title={{label}}>{{label}}</div>
{{yield}} {{yield}}