Transform "active" boolean attribute in round-checkbox

This commit is contained in:
Adina Țeudan 2024-04-11 15:29:28 +03:00
parent cbd9fd055b
commit c12ed0c968

View File

@ -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')