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

Feat/ds 215 accordion #538

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

Feat/ds 215 accordion #538

wants to merge 14 commits into from

Conversation

vicky-comeau
Copy link
Contributor

No description provided.

Copy link

changeset-bot bot commented Nov 29, 2024

🦋 Changeset detected

Latest commit: 14c40d7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hopper-ui/components Patch

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

Copy link

netlify bot commented Nov 29, 2024

Deploy Preview for wl-hopper ready!

Name Link
🔨 Latest commit 14c40d7
🔍 Latest deploy log https://app.netlify.com/sites/wl-hopper/deploys/674a6669c89c760008d8bff2
😎 Deploy Preview https://deploy-preview-538--wl-hopper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

View Storybook

@vicky-comeau vicky-comeau marked this pull request as draft November 29, 2024 20:12
@@ -28,6 +29,9 @@ function Disclosure(props: DisclosureProps, ref: ForwardedRef<HTMLDivElement>) {
...otherProps
} = ownProps;

const disclosureHeaderCtx = useSlottedContext(DisclosureHeaderContext);
Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

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.

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

Successfully merging this pull request may close these issues.

3 participants