-
Notifications
You must be signed in to change notification settings - Fork 71
Add children to Card type #3220
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
Conversation
🦋 Changeset detectedLatest commit: 0baa570 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
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 |
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.
Pull Request Overview
Adds explicit children
type to the Card component's TypeScript interface for consistency with other LeafyGreen components like Button. The change ensures proper type safety and IntelliSense support for the Card's content prop.
- Adds
children?: React.ReactNode
toInternalCardProps
interface with JSDoc documentation - Updates README.md to document the
children
prop in the component API table
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/card/src/Card/types.ts | Adds explicit children prop to Card's TypeScript interface with documentation |
packages/card/README.md | Documents the children prop in the API reference table |
Size Change: 0 B Total Size: 1.59 MB ℹ️ View Unchanged
|
✍️ Proposed changes
Add explicit
children
type to Card component. Card is typed usingInferredPolymorphicProps
, which is the same as Button, and Button does explicitly specifychildren
.Let me know if specific testing would help!
✅ Checklist
For bug fixes, new features & breaking changes
pnpm changeset
and documented my changes🧪 How to test changes