-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Conversation
fixed ts error No title prop defined:
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.
updated branch
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.
Left a minor comment for visibility purposes but overall the change looks good. Nice work!
code/ui/blocks/src/blocks/Meta.tsx
Outdated
|
||
/** | ||
* 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 }) => { |
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 don't think you need to destructure the title
out of props here as it's never being used.
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.
@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.
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.
Sorry for being slow here @iqbalcodes6602 ! Thank you for this 💪
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
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]