Skip to content

Commit 02f4411

Browse files
authoredFeb 10, 2023
fix(TooltipProvider): add TooltipProviderProps
react 17+ types require a generic argument to be passed to PropsWithChildren, even if it has no other props
1 parent 7ce5fc4 commit 02f4411

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/components/TooltipProvider/TooltipProvider.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ const DEFAULT_CONTEXT_DATA_WRAPPER: TooltipContextDataWrapper = {
3434

3535
const TooltipContext = createContext<TooltipContextDataWrapper>(DEFAULT_CONTEXT_DATA_WRAPPER)
3636

37-
const TooltipProvider: React.FC<PropsWithChildren> = ({ children }) => {
37+
interface TooltipProviderProps {}
38+
39+
const TooltipProvider: React.FC<PropsWithChildren<TooltipProviderProps>> = ({ children }) => {
3840
const [anchorRefMap, setAnchorRefMap] = useState<Record<string, Set<AnchorRef>>>({
3941
[DEFAULT_TOOLTIP_ID]: new Set(),
4042
})

0 commit comments

Comments
 (0)
Please sign in to comment.