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

Doc Blocks: Add title to Meta prop types #23370

Merged
merged 7 commits into from Aug 29, 2023

Conversation

iqbalcodes6602
Copy link
Contributor

fixed ts error No title prop defined:

Closes #22910

What I did

I defined a variable title with type String so that TS no longer has undefined prop.

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"]

fixed ts error No title prop defined:
Copy link
Contributor Author

@iqbalcodes6602 iqbalcodes6602 left a comment

Choose a reason for hiding this comment

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

updated branch

Copy link

@MWhite-22 MWhite-22 left a comment

Choose a reason for hiding this comment

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

Left a minor comment for visibility purposes but overall the change looks good. Nice work!


/**
* This component is used to declare component metadata in docs
* and gets transformed into a default export underneath the hood.
*/
export const Meta: FC<MetaProps> = ({ of }) => {
export const Meta: FC<MetaProps> = ({ of, title }) => {

Choose a reason for hiding this comment

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

I don't think you need to destructure the title out of props here as it's never being used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MWhite-22 thank u for responding. I have updated this please can you consider this PR for merging so that i can get my first PR merged.

@JReinhold JReinhold changed the title issue#22910 Doc Blocks: Add title to Meta prop types Aug 29, 2023
@JReinhold JReinhold added the bug label Aug 29, 2023
Copy link
Contributor

@JReinhold JReinhold left a comment

Choose a reason for hiding this comment

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

Sorry for being slow here @iqbalcodes6602 ! Thank you for this 💪

@JReinhold JReinhold merged commit 21e68f7 into storybookjs:next Aug 29, 2023
47 of 51 checks passed
@yannbf yannbf mentioned this pull request Oct 17, 2023
5 tasks
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.

[Bug]: The Meta docs component has no type for title, though it still works.
4 participants