Skip to content

Commit

Permalink
fix TS type of Tooltip.label prop (#3597)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheyenbrock authored May 11, 2024
1 parent 79d1d99 commit 224b43f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/twenty-chicken-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphiql/react': patch
---

Fix TypeScript type of the `label` prop of the `Tooltip` component
4 changes: 2 additions & 2 deletions packages/graphiql-react/src/ui/tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReactElement } from 'react';
import { ReactElement, ReactNode } from 'react';
import * as T from '@radix-ui/react-tooltip';
import { createComponentGroup } from '../utility/component-group';
import './tooltip.css';
Expand All @@ -9,7 +9,7 @@ export function TooltipRoot({
side = 'bottom',
sideOffset = 5,
label,
}: T.TooltipContentProps & { label: string }): ReactElement {
}: T.TooltipContentProps & { label: ReactNode }): ReactElement {
return (
<T.Root>
<T.Trigger asChild>{children}</T.Trigger>
Expand Down

0 comments on commit 224b43f

Please sign in to comment.