Refactor: Normalize order of alternatives

This commit is contained in:
Lea Verou
2024-12-14 19:51:04 -05:00
parent 325eaeb225
commit 7b0274a657
6 changed files with 6 additions and 6 deletions

View File

@@ -177,7 +177,7 @@ export default class WaColorPicker extends WebAwesomeFormAssociatedElement {
}
/** The default value of the form control. Primarily used for resetting the form control. */
@property({ attribute: 'value', reflect: true }) defaultValue: null | string = this.getAttribute('value') || null;
@property({ attribute: 'value', reflect: true }) defaultValue: string | null = this.getAttribute('value') || null;
@property({ attribute: 'with-label', reflect: true, type: Boolean }) withLabel = false;
@property({ attribute: 'with-hint', reflect: true, type: Boolean }) withHint = false;

View File

@@ -116,7 +116,7 @@ export default class WaInput extends WebAwesomeFormAssociatedElement {
}
/** The default value of the form control. Primarily used for resetting the form control. */
@property({ attribute: 'value', reflect: true }) defaultValue: null | string = this.getAttribute('value') || null;
@property({ attribute: 'value', reflect: true }) defaultValue: string | null = this.getAttribute('value') || null;
/** The input's size. */
@property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';

View File

@@ -99,7 +99,7 @@ export default class WaRadioGroup extends WebAwesomeFormAssociatedElement {
}
/** The default value of the form control. Primarily used for resetting the form control. */
@property({ attribute: 'value', reflect: true }) defaultValue: null | string = this.getAttribute('value') || null;
@property({ attribute: 'value', reflect: true }) defaultValue: string | null = this.getAttribute('value') || null;
/** The radio group's size. This size will be applied to all child radios and radio buttons. */
@property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';

View File

@@ -126,7 +126,7 @@ export default class WaRange extends WebAwesomeFormAssociatedElement {
* to place the form control outside of a form and associate it with the form that has this `id`. The form must be in
* the same document or shadow root for this to work.
*/
@property({ reflect: true }) form: null | string = null;
@property({ reflect: true }) form: string | null = null;
/**
* Used for SSR to render slotted labels. If true, will render slotted label content on first paint.

View File

@@ -90,7 +90,7 @@ export default class WaSwitch extends WebAwesomeFormAssociatedElement {
}
/** The default value of the form control. Primarily used for resetting the form control. */
@property({ attribute: 'value', reflect: true }) defaultValue: null | string = this.getAttribute('value') || null;
@property({ attribute: 'value', reflect: true }) defaultValue: string | null = this.getAttribute('value') || null;
/** The switch's size. */
@property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';

View File

@@ -103,7 +103,7 @@ export default class WaTooltip extends WebAwesomeElement {
*/
@property({ type: Boolean }) hoist = false;
@property() for: null | string = null;
@property() for: string | null = null;
@state() anchor: null | Element = null;