From fe86936d91ab3bddfb6aefef80498965f3520ec7 Mon Sep 17 00:00:00 2001 From: Elizabeth Mitchell Date: Mon, 8 Aug 2022 12:15:20 -0700 Subject: [PATCH] chore(text-field): remove wrapper slot spans PiperOrigin-RevId: 466112636 --- textfield/filled-text-field.ts | 9 ++------- textfield/lib/text-field.ts | 16 ++++++++++++---- textfield/outlined-text-field.ts | 9 ++------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/textfield/filled-text-field.ts b/textfield/filled-text-field.ts index d471fef227..31c7721e06 100644 --- a/textfield/filled-text-field.ts +++ b/textfield/filled-text-field.ts @@ -33,7 +33,6 @@ export class MdFilledTextField extends FilledTextField { /** @soyTemplate */ protected override renderField(): TemplateResult { - // TODO(b/239690585): move start/end slots to renderFieldContent return html` - - ${this.renderLeadingIcon()} - + ${this.renderLeadingIcon()} ${this.renderFieldContent()} - - ${this.renderTrailingIcon()} - + ${this.renderTrailingIcon()} `; } diff --git a/textfield/lib/text-field.ts b/textfield/lib/text-field.ts index 9ccd2a760a..148754da10 100644 --- a/textfield/lib/text-field.ts +++ b/textfield/lib/text-field.ts @@ -175,19 +175,27 @@ export class TextField extends LitElement { return html`${prefix}${input}${suffix}`; } - /** @soyTemplate */ + /** + * @soyTemplate + * @slotName start + */ protected renderLeadingIcon(): TemplateResult { return html` - + `; } - /** @soyTemplate */ + /** + * @soyTemplate + * @slotName end + */ protected renderTrailingIcon(): TemplateResult { return html` - + `; diff --git a/textfield/outlined-text-field.ts b/textfield/outlined-text-field.ts index 7a6d920aae..c81d0715ba 100644 --- a/textfield/outlined-text-field.ts +++ b/textfield/outlined-text-field.ts @@ -33,7 +33,6 @@ export class MdOutlinedTextField extends OutlinedTextField { /** @soyTemplate */ protected override renderField(): TemplateResult { - // TODO(b/239690585): move start/end slots to renderFieldContent return html` - - ${this.renderLeadingIcon()} - + ${this.renderLeadingIcon()} ${this.renderFieldContent()} - - ${this.renderTrailingIcon()} - + ${this.renderTrailingIcon()} `; }