Skip to content

Commit 224b43f

Browse files
fix TS type of Tooltip.label prop (#3597)
1 parent 79d1d99 commit 224b43f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/twenty-chicken-shout.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphiql/react': patch
3+
---
4+
5+
Fix TypeScript type of the `label` prop of the `Tooltip` component

packages/graphiql-react/src/ui/tooltip.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ReactElement } from 'react';
1+
import { ReactElement, ReactNode } from 'react';
22
import * as T from '@radix-ui/react-tooltip';
33
import { createComponentGroup } from '../utility/component-group';
44
import './tooltip.css';
@@ -9,7 +9,7 @@ export function TooltipRoot({
99
side = 'bottom',
1010
sideOffset = 5,
1111
label,
12-
}: T.TooltipContentProps & { label: string }): ReactElement {
12+
}: T.TooltipContentProps & { label: ReactNode }): ReactElement {
1313
return (
1414
<T.Root>
1515
<T.Trigger asChild>{children}</T.Trigger>

0 commit comments

Comments
 (0)