Docs: add Usage section with JavaScript guide for Accordion component#40768
Docs: add Usage section with JavaScript guide for Accordion component#40768
Conversation
|
@julien-deramond Thoughts on linking to Collapse usage docs instead as mentioned? |
|
Eh, it's a similar situation to tooltips/popovers, so going to just roll with it. |
9fe658a to
71b7c9a
Compare
As you mentioned, it's pretty much the same situation as with tooltips and popovers—the only real difference is that the word "tooltip" or "popover" is swapped out, and here it's just "collapse" instead. The content is nearly identical. I don't mind the temporary duplication, though. We can always revisit this once the docs are migrated to Astro. It'll likely be easier to create reusable content there, especially since Hugo doesn’t handle nesting partials or shortcodes very well (at least from what I remember). |
71b7c9a to
2243be3
Compare
Co-authored-by: Tommaso Allegretti <tommasoallegretti@users.noreply.github.com>
2243be3 to
c7829b5
Compare
julien-deramond
left a comment
There was a problem hiding this comment.
Thanks for the PR, @TommasoAllegretti!
I’ve rebased your commit and adapted it to the updated Astro architecture, incorporating content from the Collapse component.
I haven’t yet managed to extract the content into a reusable form, but I’ve added a task for that to #41380 for future exploration.
I’m good with the changes.
@mdo, feel free to give it a final review and merge if all looks good.
Description
Added a section in the Accordion documentation to explain how to handle it via JavaScript, the section is almost identical to the one in the Collapse documentation (since it is the same) with a few minor changes.
It might be better to just link to the Collapse docs instead?
Type of changes
Checklist
npm run lint)Live previews
Related issues
Closes #40760