refactor: remove React.FC for component package (#3575)

This commit is contained in:
Garfield Lee
2023-08-04 23:00:28 +08:00
committed by GitHub
parent 7ec4b8fb8c
commit 65fc0ed59c
21 changed files with 165 additions and 149 deletions
@@ -1,24 +1,24 @@
import * as Avatar from '@radix-ui/react-avatar';
import clsx from 'clsx';
import type { CSSProperties, FC } from 'react';
import type { CSSProperties } from 'react';
import * as style from './style.css';
export type UserAvatar = {
export interface UserAvatar {
size?: number;
url?: string;
name?: string;
className?: string;
style?: CSSProperties;
};
}
export const UserAvatar: FC<UserAvatar> = ({
export const UserAvatar = ({
size = 20,
style: propsStyles = {},
url,
name,
className,
}) => {
}: UserAvatar) => {
return (
<Avatar.Root
style={{