Skip to content

Commit

Permalink
mark components as fc to avoid type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Aug 28, 2024
1 parent 1cd4917 commit 09393c8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions components/src/components/atoms/Avatar/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export type Props = {
size?: BoxProps['wh']
} & Omit<NativeImgAttributes, 'alt' | 'onError' | 'children' | 'onError'>

export const Avatar = ({
export const Avatar: React.FC<Props> = ({
label,
shape = 'circle',
src,
Expand All @@ -85,7 +85,7 @@ export const Avatar = ({
checked,
size,
...props
}: Props) => {
}) => {
const ref = React.useRef<HTMLImageElement>(null)
const [showImage, setShowImage] = React.useState(!!src)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const PopoverBox = React.forwardRef<HTMLElement, BoxProps & PopoverBoxProps>(
),
)

export const DynamicPopover = ({
export const DynamicPopover: React.FC<DynamicPopoverProps> = ({
popover,
placement = 'top',
mobilePlacement = 'top',
Expand All @@ -213,7 +213,7 @@ export const DynamicPopover = ({
isOpen,
align = 'center',
hideOverflow,
}: DynamicPopoverProps) => {
}) => {
const popoverContainerRef = React.useRef<HTMLDivElement>()

const isControlled = isOpen !== undefined
Expand Down
4 changes: 2 additions & 2 deletions components/src/components/atoms/Tag/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export type Props = {
} & Omit<BoxProps, 'size'> &
WithColorStyle

export const Tag = ({
export const Tag: React.FC<Props> = ({
as = 'div',
children,
hover,
size = 'small',
colorStyle = 'accentSecondary',
...props
}: Props) => {
}) => {
return (
<Box
alignItems="center"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'

import { Box, BoxProps } from '../Box/Box'

export const VisuallyHidden = (props: BoxProps) => (
export const VisuallyHidden: React.FC<BoxProps> = props => (
<Box
as="div"
borderWidth="$0"
Expand Down

0 comments on commit 09393c8

Please sign in to comment.