select-toggle.component.ts 513 B

123456789101112131415
  1. import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
  2. /**
  3. * A simple, stateless toggle button for indicating selection.
  4. */
  5. @Component({
  6. selector: 'vdr-select-toggle',
  7. templateUrl: './select-toggle.component.html',
  8. styleUrls: ['./select-toggle.component.scss'],
  9. changeDetection: ChangeDetectionStrategy.OnPush,
  10. })
  11. export class SelectToggleComponent {
  12. @Input() selected = false;
  13. @Output() selectedChange = new EventEmitter<boolean>();
  14. }