-
Notifications
You must be signed in to change notification settings - Fork 71
Updates title prop in Chart Card #3213
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: 3e99abd The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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
Updates the title
prop type in ChartCard from string
to React.ReactNode
to support more flexible title content including JSX elements.
- Changes the
title
prop type fromstring
toReact.ReactNode
in the TypeScript interface - Updates documentation to reflect the new prop type
- Adds changeset documenting the minor breaking change
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
charts/chart-card/src/ChartCard/ChartCard.types.ts | Updates title prop type from string to React.ReactNode |
charts/chart-card/README.md | Updates documentation table to reflect new title prop type |
.changeset/fine-phones-marry.md | Documents the breaking change for release notes |
* The title of the card | ||
*/ | ||
title: string; | ||
title: React.ReactNode; |
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.
If we want to completely open this up to anything, then I think we should probably do the same for an individual ChartHeader
https://github.com/mongodb/leafygreen-ui/blob/main/charts/core/src/ChartHeader/ChartHeader.types.ts#L8
Size Change: 0 B Total Size: 1.59 MB ℹ️ View Unchanged
|
✍️ Proposed changes
🎟 Jira ticket: Name of ticket
✅ Checklist
For new components
For bug fixes, new features & breaking changes
pnpm changeset
and documented my changes🧪 How to test changes