diff --git a/.changeset/twenty-chicken-shout.md b/.changeset/twenty-chicken-shout.md new file mode 100644 index 00000000000..7c8626b1be3 --- /dev/null +++ b/.changeset/twenty-chicken-shout.md @@ -0,0 +1,5 @@ +--- +'@graphiql/react': patch +--- + +Fix TypeScript type of the `label` prop of the `Tooltip` component diff --git a/packages/graphiql-react/src/ui/tooltip.tsx b/packages/graphiql-react/src/ui/tooltip.tsx index 8bbcaf88ac8..af141a9364c 100644 --- a/packages/graphiql-react/src/ui/tooltip.tsx +++ b/packages/graphiql-react/src/ui/tooltip.tsx @@ -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'; @@ -9,7 +9,7 @@ export function TooltipRoot({ side = 'bottom', sideOffset = 5, label, -}: T.TooltipContentProps & { label: string }): ReactElement { +}: T.TooltipContentProps & { label: ReactNode }): ReactElement { return ( {children}