RED-6801 - added active style to icon button

This commit is contained in:
Valentin Mihai 2023-07-04 16:25:14 +03:00
parent 2d6ee6655c
commit 7efa3b7ad2
2 changed files with 10 additions and 0 deletions

View File

@ -90,6 +90,14 @@ iqser-icon-button {
&.dark { &.dark {
background: var(--iqser-btn-bg); background: var(--iqser-btn-bg);
} }
&.active {
background: #fcebeb;
font-weight: 600;
color: var(--iqser-primary);
cursor: default;
pointer-events: none;
}
} }
} }

View File

@ -19,6 +19,7 @@ export class IconButtonComponent {
@Input() buttonId = `${randomString()}-icon-button`; @Input() buttonId = `${randomString()}-icon-button`;
@Input() icon?: string; @Input() icon?: string;
@Input() showDot = false; @Input() showDot = false;
@Input() active = false;
@Input() disabled = false; @Input() disabled = false;
@Input() submit = false; @Input() submit = false;
@Input() type: IconButtonType = IconButtonTypes.default; @Input() type: IconButtonType = IconButtonTypes.default;
@ -30,6 +31,7 @@ export class IconButtonComponent {
overlay: this.showDot, overlay: this.showDot,
[this.type]: true, [this.type]: true,
'has-icon': !!this.icon, 'has-icon': !!this.icon,
active: this.active,
}; };
} }
} }