Skip to content

Commit

Permalink
fix(button)!: remove label property
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 526741279
  • Loading branch information
asyncLiz authored and copybara-github committed Apr 24, 2023
1 parent 743451b commit e398099
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions button/lib/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@ export abstract class Button extends LitElement {
*/
@property({type: Boolean, attribute: 'trailingicon'}) trailingIcon = false;

// TODO(b/272598771): remove label property
/**
* The button's visible label.
*
* @deprecated Set text as content of the button instead.
*/
@property() label = '';

/**
* Whether to display the icon or not.
*/
Expand Down Expand Up @@ -179,9 +171,7 @@ export abstract class Button extends LitElement {
}

protected renderLabel(): TemplateResult {
// TODO(b/272598771): remove the ternary when label property is removed
return html`<span class="md3-button__label">${
this.label ? this.label : html`<slot></slot>`}</span>`;
return html`<span class="md3-button__label"><slot></slot></span>`;
}

protected renderLeadingIcon(): TemplateResult|string {
Expand Down

0 comments on commit e398099

Please sign in to comment.