From 09393c82783114c9e3ed9396c59ad52a5a1b91b5 Mon Sep 17 00:00:00 2001 From: v1rtl Date: Wed, 28 Aug 2024 12:54:53 +0300 Subject: [PATCH] mark components as fc to avoid type errors --- components/src/components/atoms/Avatar/Avatar.tsx | 4 ++-- .../src/components/atoms/DynamicPopover/DynamicPopover.tsx | 4 ++-- components/src/components/atoms/Tag/Tag.tsx | 4 ++-- .../src/components/atoms/VisuallyHidden/VisuallyHidden.tsx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/src/components/atoms/Avatar/Avatar.tsx b/components/src/components/atoms/Avatar/Avatar.tsx index d3c0bb7b..f381fb12 100644 --- a/components/src/components/atoms/Avatar/Avatar.tsx +++ b/components/src/components/atoms/Avatar/Avatar.tsx @@ -74,7 +74,7 @@ export type Props = { size?: BoxProps['wh'] } & Omit -export const Avatar = ({ +export const Avatar: React.FC = ({ label, shape = 'circle', src, @@ -85,7 +85,7 @@ export const Avatar = ({ checked, size, ...props -}: Props) => { +}) => { const ref = React.useRef(null) const [showImage, setShowImage] = React.useState(!!src) diff --git a/components/src/components/atoms/DynamicPopover/DynamicPopover.tsx b/components/src/components/atoms/DynamicPopover/DynamicPopover.tsx index 77baf442..5096a766 100644 --- a/components/src/components/atoms/DynamicPopover/DynamicPopover.tsx +++ b/components/src/components/atoms/DynamicPopover/DynamicPopover.tsx @@ -198,7 +198,7 @@ const PopoverBox = React.forwardRef( ), ) -export const DynamicPopover = ({ +export const DynamicPopover: React.FC = ({ popover, placement = 'top', mobilePlacement = 'top', @@ -213,7 +213,7 @@ export const DynamicPopover = ({ isOpen, align = 'center', hideOverflow, -}: DynamicPopoverProps) => { +}) => { const popoverContainerRef = React.useRef() const isControlled = isOpen !== undefined diff --git a/components/src/components/atoms/Tag/Tag.tsx b/components/src/components/atoms/Tag/Tag.tsx index 8e184c80..abf85498 100644 --- a/components/src/components/atoms/Tag/Tag.tsx +++ b/components/src/components/atoms/Tag/Tag.tsx @@ -18,14 +18,14 @@ export type Props = { } & Omit & WithColorStyle -export const Tag = ({ +export const Tag: React.FC = ({ as = 'div', children, hover, size = 'small', colorStyle = 'accentSecondary', ...props -}: Props) => { +}) => { return ( ( +export const VisuallyHidden: React.FC = props => (