Skip to content

Commit

Permalink
fix(elevation): expose md-elevation ::part in all components
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 612946796
  • Loading branch information
Elliott Marquez authored and copybara-github committed Mar 5, 2024
1 parent 1c2197b commit b74e3dd
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion button/internal/elevated-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ import {Button} from './button.js';
*/
export class ElevatedButton extends Button {
protected override renderElevationOrOutline() {
return html`<md-elevation></md-elevation>`;
return html`<md-elevation part="elevation"></md-elevation>`;
}
}
2 changes: 1 addition & 1 deletion button/internal/filled-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ import {Button} from './button.js';
*/
export class FilledButton extends Button {
protected override renderElevationOrOutline() {
return html`<md-elevation></md-elevation>`;
return html`<md-elevation part="elevation"></md-elevation>`;
}
}
2 changes: 1 addition & 1 deletion button/internal/filled-tonal-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ import {Button} from './button.js';
*/
export class FilledTonalButton extends Button {
protected override renderElevationOrOutline() {
return html`<md-elevation></md-elevation>`;
return html`<md-elevation part="elevation"></md-elevation>`;
}
}
2 changes: 1 addition & 1 deletion chips/internal/assist-chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class AssistChip extends Chip {

protected override renderOutline() {
if (this.elevated) {
return html`<md-elevation></md-elevation>`;
return html`<md-elevation part="elevation"></md-elevation>`;
}

return super.renderOutline();
Expand Down
2 changes: 1 addition & 1 deletion chips/internal/filter-chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class FilterChip extends MultiActionChip {

protected override renderOutline() {
if (this.elevated) {
return html`<md-elevation></md-elevation>`;
return html`<md-elevation part="elevation"></md-elevation>`;
}

return super.renderOutline();
Expand Down
2 changes: 1 addition & 1 deletion fab/internal/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export abstract class SharedFab extends LitElement {
<button
class="fab ${classMap(this.getRenderClasses())}"
aria-label=${ariaLabel || nothing}>
<md-elevation></md-elevation>
<md-elevation part="elevation"></md-elevation>
<md-focus-ring part="focus-ring"></md-focus-ring>
<md-ripple class="ripple"></md-ripple>
${this.renderTouchTarget()} ${this.renderIcon()} ${this.renderLabel()}
Expand Down
2 changes: 1 addition & 1 deletion labs/navigationbar/internal/navigation-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class NavigationBar extends LitElement implements NavigationBarState {
@keydown="${this.handleKeydown}"
@navigation-tab-interaction="${this.handleNavigationTabInteraction}"
@navigation-tab-rendered=${this.handleNavigationTabConnected}
><md-elevation></md-elevation
><md-elevation part="elevation"></md-elevation
><div class="md3-navigation-bar__tabs-slot-container"><slot></slot></div
></div>`;
}
Expand Down
2 changes: 1 addition & 1 deletion labs/navigationdrawer/internal/navigation-drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class NavigationDrawer extends LitElement {
aria-modal="${ariaModal || nothing}"
class="md3-navigation-drawer ${this.getRenderClasses()}"
role="dialog">
<md-elevation></md-elevation>
<md-elevation part="elevation"></md-elevation>
<div class="md3-navigation-drawer__slot-content">
<slot></slot>
</div>
Expand Down
4 changes: 3 additions & 1 deletion slider/internal/slider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,9 @@ export class Slider extends sliderBaseClass {
for=${name}
class=${name}
?disabled=${this.disabled}></md-ripple>
<div class="handleNub"><md-elevation></md-elevation></div>
<div class="handleNub">
<md-elevation part="elevation"></md-elevation>
</div>
${when(this.labeled, () => this.renderLabel(label))}
</div>`;
}
Expand Down
2 changes: 1 addition & 1 deletion tabs/internal/tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class Tab extends tabBaseClass {
role="presentation"
@click=${this.handleContentClick}>
<md-focus-ring part="focus-ring" inward .control=${this}></md-focus-ring>
<md-elevation></md-elevation>
<md-elevation part="elevation"></md-elevation>
<md-ripple .control=${this}></md-ripple>
<div
class="content ${classMap(this.getContentClasses())}"
Expand Down

0 comments on commit b74e3dd

Please sign in to comment.