From 06b4e817baa24ecae5e7a0d2bf8ef8c8cbbd2aa7 Mon Sep 17 00:00:00 2001 From: Roman Pominov Date: Wed, 19 Oct 2022 16:23:23 +0400 Subject: [PATCH] more fixes --- packages/design-system/src/components/tooltip.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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