-
-
Notifications
You must be signed in to change notification settings - Fork 805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose spinner part on tree item #1937
Expose spinner part on tree item #1937
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -257,7 +258,7 @@ export default class SlTreeItem extends ShoelaceElement { | |||
})} | |||
aria-hidden="true" | |||
> | |||
${when(this.loading, () => html` <sl-spinner></sl-spinner> `)} | |||
${when(this.loading, () => html` <sl-spinner part="spinner"></sl-spinner> `)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
When exposing a part, we want to make sure we expose "sub-parts" too, so this needs something like exportparts="base:spinner__base"
per these guidelines and another @csspart
entry.
For reference, spinner parts can be found here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added!
@claviska Thank you for reviewing and releasing so fast! Appreciate it |
Other components that use the spinner (like button and menu item) expose the spinner part to allow for customisation. This just adds the same behaviour for the tree item.
My use-case for this is to customise the colour of the tree item spinner.