perf: share link

This commit is contained in:
archer
2023-07-28 09:38:50 +08:00
parent 36b234c4fd
commit f65a72821b
22 changed files with 171 additions and 40 deletions

View File

@@ -6,12 +6,20 @@ import MyIcon from '@/components/Icon';
// @ts-ignore
interface Props extends GridProps {
list: { icon?: string; title: string; desc?: string; value: string | number }[];
iconSize?: string;
align?: 'top' | 'center';
value: string | number;
onChange: (e: string | number) => void;
}
const MyRadio = ({ list, value, align = 'center', onChange, ...props }: Props) => {
const MyRadio = ({
list,
value,
align = 'center',
iconSize = '18px',
onChange,
...props
}: Props) => {
const theme = useTheme();
return (
<Grid gridGap={[3, 5]} fontSize={['sm', 'md']} {...props}>
@@ -60,7 +68,7 @@ const MyRadio = ({ list, value, align = 'center', onChange, ...props }: Props) =
}}
onClick={() => onChange(item.value)}
>
{!!item.icon && <MyIcon mr={'14px'} name={item.icon as any} w={'18px'} />}
{!!item.icon && <MyIcon mr={'14px'} name={item.icon as any} w={iconSize} />}
<Box>
<Box>{item.title}</Box>
{!!item.desc && (