mirror of
https://github.com/documize/community.git
synced 2025-07-22 06:39:43 +02:00
Provide options for UI buttons to expand to fill parent
This commit is contained in:
parent
6126d4dd5d
commit
6c71a1f18d
2 changed files with 11 additions and 3 deletions
|
@ -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;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|
|
@ -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}}
|
Loading…
Add table
Add a link
Reference in a new issue