@Component({
selector: 'my-button',
- styleUrls: ['./button.component.scss'],
+ styleUrls: [ './button.component.scss' ],
templateUrl: './button.component.html'
})
@Input() label = ''
@Input() className = 'grey-button'
@Input() icon: GlobalIconName = undefined
+ @Input() routerLink: string[] | string
@Input() title: string = undefined
@Input() loading = false
@Input() disabled = false
-
- getTitle () {
- return this.title || this.label
- }
+ @Input() responsiveLabel = false
getClasses () {
return {
[this.className]: true,
- disabled: this.disabled
+ disabled: this.disabled,
+ 'icon-only': !this.label,
+ 'has-icon': !!this.icon,
+ 'responsive-label': this.responsiveLabel
}
}
}