import React from 'react';
import { Flex, type FlexProps } from '@chakra-ui/react';
import MyIcon from './index';
import MyTooltip from '../MyTooltip';
type Props = FlexProps & {
icon: string;
size?: string;
hoverColor?: string;
hoverBg?: string;
hoverBorderColor?: string;
tip?: string;
isLoading?: boolean;
};
const MyIconButton = ({
icon,
onClick,
hoverColor = 'primary.600',
hoverBg = 'myGray.05',
hoverBorderColor = '',
size = '1rem',
tip,
isLoading = false,
...props
}: Props) => {
return (
{
if (isLoading) return;
onClick?.(e);
}}
sx={{ userSelect: 'none' }}
{...props}
>
);
};
export default MyIconButton;
export const MyDeleteIconButton = ({ onClick, ...props }: Omit) => {
return (
);
};