Skip to content

Commit

Permalink
fix(progress)!: remove circular progress slots
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 549190658
  • Loading branch information
asyncLiz authored and copybara-github committed Jul 19, 2023
1 parent 9d3501b commit aea4d5e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
22 changes: 16 additions & 6 deletions progress/demo/stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,17 @@ const standardCircular: MaterialStoryInit<StoryKnobs> = {
};
const iconButton: MaterialStoryInit<StoryKnobs> = {
name: 'Containing an icon-button',
styles: css`.aroundIcon {
--md-circular-progress-size: 48px;
}`,
styles: css`
.around-icon {
position: relative;
}
md-standard-icon-button {
inset: 0;
margin: auto;
position: absolute;
}
`,
render({progress, indeterminate, fourColor}) {
const toggle = ({target}: Event) => {
const spinner =
Expand All @@ -87,16 +95,18 @@ const iconButton: MaterialStoryInit<StoryKnobs> = {
};

return html`
<md-circular-progress class="aroundIcon"
<div class="around-icon">
<md-circular-progress
.progress=${progress}
.indeterminate=${indeterminate}
.fourColor=${fourColor}
>
></md-circular-progress>
<md-standard-icon-button toggle @change=${toggle}>
<md-icon>play_arrow</md-icon>
<md-icon slot="selectedIcon">pause</md-icon>
</md-standard-icon-button>
</md-circular-progress>`;
</div>
`;
}
};
const insideButton: MaterialStoryInit<StoryKnobs> = {
Expand Down
2 changes: 1 addition & 1 deletion progress/lib/circular-progress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class CircularProgress extends LitElement {
this.indeterminate ? this.renderIndeterminateContainer() :
this.renderDeterminateContainer()}
</div>
<slot></slot>`;
`;
}

// Determinate mode is rendered with an svg so the progress arc can be
Expand Down

0 comments on commit aea4d5e

Please sign in to comment.