Skip to content

Instantly share code, notes, and snippets.

@Dornhoth
Created September 1, 2020 17:32
Show Gist options
  • Save Dornhoth/92b3aecfd99d4268fbf901c72bba9440 to your computer and use it in GitHub Desktop.
Save Dornhoth/92b3aecfd99d4268fbf901c72bba9440 to your computer and use it in GitHub Desktop.
info-button
<mat-icon class="info-icon" (click)="toggleInfoByClick()" color="primary">info</mat-icon>
.info-icon {
cursor: pointer;
font-size: 16px;
margin-left: 8px;
height: 16px;
}
import { Component, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'app-info-button',
templateUrl: './info-button.component.html',
styleUrls: ['./info-button.component.scss'],
})
export class InfoButtonComponent {
@Output() infoButtonClicked = new EventEmitter<void>();
toggleInfoByClick(): void {
this.infoButtonClicked.emit();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment