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

Feature/accordion slots #1289

Closed

Conversation

bgilhome-now
Copy link
Contributor

Issue:
A PR for the feature request at #1288

What I did

  • Allowed passing accordion items' content & title via slots (default slot and named slot 'title' respectively)
  • Allowed items prop to be undefined, auto-setting integer item IDs if slots are used instead

How to test

  • See new 'Accordion using slots' story in the Storybook for the Accordion component

Checklist

For all PR's

  • I've added relevant changes to the project Readme if needed.
  • I've updated the documentation site as needed.
  • I have added unit tests to cover my changes (if not applicable, please state why in a comment)

For new components only

  • I have added a story covering all variants
  • I have checked a11y tab in storybook passes
  • Any events are emitted on the event bus

@dylankelly
Copy link
Contributor

@bgilhome-now there are few implementation issues with this that we have raised a ticket internally to look at. We will look at this in the next release.

@bgilhome-now
Copy link
Contributor Author

Thanks @dylankelly !

@waitingallday
Copy link
Member

Released in #1327 using the child-component-wrapper pattern we've used in a few other places.

@bgilhome-now thanks for the PR 🙌 a sample of the required markup is included in the PR description above (two slots, one named).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants