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

Blocks: Add children prop types #21803

Conversation

JReinhold
Copy link
Contributor

Closes #19359

What I did

This PR adds proper typings for any components in @storybook/blocks that accepts children, so the types are valid for the new React v18 types where children are not implicit.

Interestingly, the original issue with ColorPalette was already fixed in #18478, submitted around the same time. This PR just continues that work.

There might be other internal components where this would make sense but I've focused in the user-facing Blocks in this PR.

How to test

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

Copy link
Contributor

@kasperpeulen kasperpeulen left a comment

Choose a reason for hiding this comment

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

LGTM

@JReinhold JReinhold merged commit 3d62df3 into next Mar 29, 2023
39 checks passed
@JReinhold JReinhold deleted the 19359-colorpalette-type-fails-to-accept-children-type-children-element-has-no-properties-in-common-with-type-intrinsicattributes branch March 29, 2023 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants