Skip to content

Commit e398099

Browse files
asyncLizcopybara-github
authored andcommitted
fix(button)!: remove label property
PiperOrigin-RevId: 526741279
1 parent 743451b commit e398099

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

button/lib/button.ts

+1-11
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,6 @@ export abstract class Button extends LitElement {
5555
*/
5656
@property({type: Boolean, attribute: 'trailingicon'}) trailingIcon = false;
5757

58-
// TODO(b/272598771): remove label property
59-
/**
60-
* The button's visible label.
61-
*
62-
* @deprecated Set text as content of the button instead.
63-
*/
64-
@property() label = '';
65-
6658
/**
6759
* Whether to display the icon or not.
6860
*/
@@ -179,9 +171,7 @@ export abstract class Button extends LitElement {
179171
}
180172

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

187177
protected renderLeadingIcon(): TemplateResult|string {

0 commit comments

Comments
 (0)