diff --git a/packages/design-system/src/components/tooltip.tsx b/packages/design-system/src/components/tooltip.tsx index 5a763d25bb..c7308df7df 100644 --- a/packages/design-system/src/components/tooltip.tsx +++ b/packages/design-system/src/components/tooltip.tsx @@ -1,12 +1,12 @@ -import React, { Ref } from "react"; +import React, { Ref, ComponentProps, Fragment } from "react"; import { styled } from "../stitches.config"; import * as TooltipPrimitive from "@radix-ui/react-tooltip"; import { Box } from "./box"; import { Paragraph } from "./paragraph"; import type { CSS } from "../stitches.config"; -type TooltipProps = React.ComponentProps & - React.ComponentProps & { +type TooltipProps = ComponentProps & + ComponentProps & { children: React.ReactElement; content: React.ReactNode; multiline?: boolean; @@ -87,14 +87,14 @@ export const InputErrorsTooltip = ({ errors, children, }: { - errors: string[] | undefined; - children: React.ComponentProps["children"]; + errors?: string[]; + children: ComponentProps["children"]; }) => { const content = errors?.map((error, index) => ( - + {index > 0 &&
} {error} -
+ )); return ( // We intentionally always pass non empty content to avoid optimization inside Tooltip