1
0
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:
Oscar Hinton
2022-12-15 12:02:56 +01:00
committed by GitHub
parent 7df799f536
commit b319713e07
2 changed files with 4 additions and 4 deletions

View File

@@ -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() {

View File

@@ -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);
} }