-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feat/ds 215 accordion #538
base: main
Are you sure you want to change the base?
Conversation
…wl-hopper into feat/DS-215-accordion
🦋 Changeset detectedLatest commit: 14c40d7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for wl-hopper ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…at/DS-215-accordion
…r into feat/DS-215-accordion
@@ -28,6 +29,9 @@ function Disclosure(props: DisclosureProps, ref: ForwardedRef<HTMLDivElement>) { | |||
...otherProps | |||
} = ownProps; | |||
|
|||
const disclosureHeaderCtx = useSlottedContext(DisclosureHeaderContext); |
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.
should be useContextValue instead of slotted i think?. Slotted is usually when you want one with a specific slot name?
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.
I think we could probably use useContext
.
I got it from here though: https://github.com/adobe/react-spectrum/blob/main/packages/%40react-spectrum/s2/src/Disclosure.tsx#L220
spectrum did use useSlottedContext
.
That's what it does in here https://github.com/adobe/react-spectrum/blob/ec25ca46d5068fd3a6f050e4a30a6cf640276058/packages/react-aria-components/src/utils.tsx#L157
so either would probably work.
btw shall I still update this, or will you take over?
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.
don't worry about it, i'm not ready to pick up the PR but i wanted to have a quick look at the code. I noticed this so i added a comment.
No description provided.