Issue 555: added ReactNode to toooltipcontent - #558
Open
Vilde Kristine Fossum (vildekfossum) wants to merge 2 commits into
Hidden character warning
The head ref may contain hidden characters: "555-st\u00f8tte-for-formatert-text-i-tooltip"
Open
Vilde Kristine Fossum (vildekfossum) wants to merge 2 commits into
Vilde Kristine Fossum (vildekfossum) wants to merge 2 commits into
Conversation
Vilde Kristine Fossum (vildekfossum)
requested a review
from a team
as a code owner
August 18, 2026 08:08
Copilot started reviewing on behalf of
Vilde Kristine Fossum (vildekfossum)
August 18, 2026 08:17
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the MdTooltip component API to allow tooltipContent to be provided as React renderable content (not just plain strings), and aligns the Storybook documentation accordingly.
Changes:
- Expanded
MdTooltipProps.tooltipContentfromstringto support ReactNode. - Updated Storybook
TooltipargTypes to reflect the updatedtooltipContenttype. - Tightened Storybook
childrenargTypes documentation toReactNode.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| stories/Tooltip.stories.tsx | Updates Storybook argTypes type summaries for tooltip props. |
| packages/react/src/tooltip/MdTooltip.tsx | Expands tooltipContent prop typing to allow ReactNode. |
Suppressed comments (1)
packages/react/src/tooltip/MdTooltip.tsx:10
- This change expands the public API to accept arbitrary ReactNode for
tooltipContent, but the existing tests only cover string content. Please add/extend a unit test to verify an element ReactNode (e.g.<span>…</span>) is rendered correctly inside the tooltip portal.
tooltipContent: string | React.ReactNode;
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Helge Johnsen (hj-inmeta)
approved these changes
Sep 14, 2026
| @@ -7,7 +7,7 @@ export interface MdTooltipProps extends React.HTMLAttributes<HTMLDivElement> { | |||
| /** | |||
Contributor
There was a problem hiding this comment.
Fjern gammel kommentar / doc
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist before requesting a review
major,minororpatch)stories-folder?packages/react/index.tsx?packages/css/index.css?