Skip to content
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

Set DetailsSummary slot by default #217

Open
sissbruecker opened this issue Jan 12, 2024 · 1 comment
Open

Set DetailsSummary slot by default #217

sissbruecker opened this issue Jan 12, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@sissbruecker
Copy link
Contributor

To assign a custom DetailsSummary in Details you need write:

<Details>
  <DetailsSummary slot="summary">foo</DetailsSummary>
</Details>

The slot="summary" seems redundant, as this is the only place where a details summary should be used. Instead, the component could set the slot by default. We could also consider doing this for the web component itself.

AccordionSummary could also be updated to use the same approach.

@web-padawan
Copy link
Member

In case of the web component, we need some kind of named slot to distinguish summary from the content.
However, similar improvement could be done for the Tooltip so that we don't need to set slot="tooltip".

@yuriy-fix yuriy-fix added the enhancement New feature or request label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants