Transform "active" boolean attribute in round-checkbox
This commit is contained in:
parent
cbd9fd055b
commit
c12ed0c968
@ -1,4 +1,4 @@
|
||||
import { ChangeDetectionStrategy, Component, ElementRef, HostBinding, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { booleanAttribute, ChangeDetectionStrategy, Component, ElementRef, HostBinding, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { NgIf } from '@angular/common';
|
||||
|
||||
@ -12,7 +12,7 @@ import { NgIf } from '@angular/common';
|
||||
})
|
||||
export class RoundCheckboxComponent implements OnInit {
|
||||
@Input() size = 20;
|
||||
@Input() active = false;
|
||||
@Input({ transform: booleanAttribute }) active = false;
|
||||
@Input() indeterminate = false;
|
||||
@Input() type: 'default' | 'with-bg' = 'default';
|
||||
@HostBinding('class.disabled')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user