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

Add PropsWithChildren to Function Component prop interfaces in the core package #431

Merged
merged 8 commits into from
Jun 6, 2022
Merged

Add PropsWithChildren to Function Component prop interfaces in the core package #431

merged 8 commits into from
Jun 6, 2022

Conversation

seang
Copy link
Contributor

@seang seang commented Jun 1, 2022

Addresses #430

@seang seang requested a review from prevwong as a code owner June 1, 2022 21:02
@netlify
Copy link

netlify bot commented Jun 1, 2022

Deploy Preview for craftjs ready!

Name Link
🔨 Latest commit 82cd253
🔍 Latest deploy log https://app.netlify.com/sites/craftjs/deploys/629b912b1aa1b50008d3a096
😎 Deploy Preview https://deploy-preview-431--craftjs.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 settings.

Copy link
Owner

@prevwong prevwong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 💯

@prevwong
Copy link
Owner

prevwong commented Jun 2, 2022

@seang Do you mind updating the one in the Events component as well? So we can keep the typings in the core package consistent.

I guess since the component has no other props, then we would have to do React.PropsWithChildren<unknown> which feels a little awkward. Probably just manually typing it out will do:

type EventsProps = {
  children?: React.ReactNode;
}

@seang
Copy link
Contributor Author

seang commented Jun 2, 2022

@seang Do you mind updating the one in the Events component as well? So we can keep the typings in the core package consistent.

I guess since the component has no other props, then we would have to do React.PropsWithChildren<unknown> which feels a little awkward. Probably just manually typing it out will do:

type EventsProps = {
  children?: React.ReactNode;
}

@prevwong sure thing! added

Co-authored-by: Prev Wong <prevwong@gmail.com>
@prevwong prevwong merged commit 0fab58b into prevwong:develop Jun 6, 2022
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.

2 participants