[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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -8,8 +8,8 @@ import { Component, Input } from "@angular/core";
export class DialogComponent {
@Input() dialogSize: "small" | "default" | "large" = "default";
private _disablePadding: boolean;
@Input() set disablePadding(value: boolean | string) {
private _disablePadding = false;
@Input() set disablePadding(value: boolean | "") {
this._disablePadding = coerceBooleanProperty(value);
}
get disablePadding() {

View File

@ -12,11 +12,11 @@ import { BitFormControlAbstraction } from "./form-control.abstraction";
export class FormControlComponent {
@Input() label: string;
private _inline: boolean;
private _inline = false;
@Input() get inline() {
return this._inline;
}
set inline(value: boolean | string | null) {
set inline(value: boolean | "") {
this._inline = coerceBooleanProperty(value);
}