Skip to content

Commit

Permalink
fix(field)!: change compound attribute names to kebab-case
Browse files Browse the repository at this point in the history
BREAKING_CHANGE: Attributes `hasstart` and `hasend` have been changed to `has-start` and `has-end` respectively.
PiperOrigin-RevId: 542626280
  • Loading branch information
AndrewJakubowicz authored and copybara-github committed Jun 22, 2023
1 parent 65d6d03 commit 2937aef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions field/lib/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions textfield/lib/text-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 2937aef

Please sign in to comment.