mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
[SM-388] Make CL boolean setters more strict (#4241)
* Make CL boolean setters more restrictive * Set default value for setters
This commit is contained in:
@@ -8,8 +8,8 @@ import { Component, Input } from "@angular/core";
|
|||||||
export class DialogComponent {
|
export class DialogComponent {
|
||||||
@Input() dialogSize: "small" | "default" | "large" = "default";
|
@Input() dialogSize: "small" | "default" | "large" = "default";
|
||||||
|
|
||||||
private _disablePadding: boolean;
|
private _disablePadding = false;
|
||||||
@Input() set disablePadding(value: boolean | string) {
|
@Input() set disablePadding(value: boolean | "") {
|
||||||
this._disablePadding = coerceBooleanProperty(value);
|
this._disablePadding = coerceBooleanProperty(value);
|
||||||
}
|
}
|
||||||
get disablePadding() {
|
get disablePadding() {
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ import { BitFormControlAbstraction } from "./form-control.abstraction";
|
|||||||
export class FormControlComponent {
|
export class FormControlComponent {
|
||||||
@Input() label: string;
|
@Input() label: string;
|
||||||
|
|
||||||
private _inline: boolean;
|
private _inline = false;
|
||||||
@Input() get inline() {
|
@Input() get inline() {
|
||||||
return this._inline;
|
return this._inline;
|
||||||
}
|
}
|
||||||
set inline(value: boolean | string | null) {
|
set inline(value: boolean | "") {
|
||||||
this._inline = coerceBooleanProperty(value);
|
this._inline = coerceBooleanProperty(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user