From bd0adfcd6dca293d7a8ff8bf8971d8d618622244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Mon, 28 Mar 2022 19:51:23 +0300 Subject: [PATCH] Disabled round checkbox cursor --- src/lib/inputs/round-checkbox/round-checkbox.component.scss | 2 +- src/lib/inputs/round-checkbox/round-checkbox.component.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/inputs/round-checkbox/round-checkbox.component.scss b/src/lib/inputs/round-checkbox/round-checkbox.component.scss index 97f77f2..a87359e 100644 --- a/src/lib/inputs/round-checkbox/round-checkbox.component.scss +++ b/src/lib/inputs/round-checkbox/round-checkbox.component.scss @@ -1,4 +1,4 @@ -:host { +:host:not(.disabled) { cursor: pointer; } diff --git a/src/lib/inputs/round-checkbox/round-checkbox.component.ts b/src/lib/inputs/round-checkbox/round-checkbox.component.ts index f96ba9d..79f02d4 100644 --- a/src/lib/inputs/round-checkbox/round-checkbox.component.ts +++ b/src/lib/inputs/round-checkbox/round-checkbox.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core'; +import { ChangeDetectionStrategy, Component, ElementRef, HostBinding, Input, OnInit, ViewChild } from '@angular/core'; @Component({ selector: 'iqser-round-checkbox', @@ -11,6 +11,9 @@ export class RoundCheckboxComponent implements OnInit { @Input() active = false; @Input() indeterminate = false; @Input() type: 'default' | 'with-bg' = 'default'; + @HostBinding('class.disabled') + @Input() + disabled = false; @ViewChild('wrapper', { static: true }) private readonly _wrapper!: ElementRef;