From 2937aefa23c8b050b5c9f66b9b29432dae87be09 Mon Sep 17 00:00:00 2001 From: Andrew Jakubowicz Date: Thu, 22 Jun 2023 11:56:49 -0700 Subject: [PATCH] fix(field)!: change compound attribute names to kebab-case BREAKING_CHANGE: Attributes `hasstart` and `hasend` have been changed to `has-start` and `has-end` respectively. PiperOrigin-RevId: 542626280 --- field/lib/field.ts | 4 ++-- textfield/lib/text-field.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/field/lib/field.ts b/field/lib/field.ts index e639bb89ad..101cd4a236 100644 --- a/field/lib/field.ts +++ b/field/lib/field.ts @@ -26,12 +26,12 @@ export class Field extends LitElement implements SurfacePositionTarget { /** * Whether or not the field has leading content. */ - @property({type: Boolean}) hasStart = false; + @property({type: Boolean, attribute: 'has-start'}) hasStart = false; /** * Whether or not the field has trailing content. */ - @property({type: Boolean}) hasEnd = false; + @property({type: Boolean, attribute: 'has-end'}) hasEnd = false; @state() private isAnimating = false; private labelAnimation?: Animation; diff --git a/textfield/lib/text-field.ts b/textfield/lib/text-field.ts index 4312d8f4d5..3c8c7f9f12 100644 --- a/textfield/lib/text-field.ts +++ b/textfield/lib/text-field.ts @@ -520,8 +520,8 @@ export abstract class TextField extends LitElement { ?disabled=${this.disabled} ?error=${this.hasError} ?focused=${this.focused} - ?hasEnd=${this.hasTrailingIcon} - ?hasStart=${this.hasLeadingIcon} + ?has-end=${this.hasTrailingIcon} + ?has-start=${this.hasLeadingIcon} .label=${this.label} ?populated=${!!this.value} ?required=${this.required}