Skip to content

Instantly share code, notes, and snippets.

@amitask3023
Created December 22, 2020 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amitask3023/a59b2d36a69f36ad074e077107220299 to your computer and use it in GitHub Desktop.
Save amitask3023/a59b2d36a69f36ad074e077107220299 to your computer and use it in GitHub Desktop.
import { Component, Input } from '@angular/core';
@Component({
selector: 'text-link-button',
template: ` <button
type="button"
[ngStyle]="{'color':textColor}"
[ngClass]="classes"
>
{{ label }}
</button>`,
styleUrls: ['./linkButton.css'],
})
export default class ButtonComponent {
@Input() label = 'Link Button ';
@Input() textColor;
@Input() disabled = true;
public get classes(): string[] {
const mode = this.disabled ? 'btn-disabled' : 'btn-link';
return ['btn', mode];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment