import React from 'react'; import MyIcon from '../Icon'; import { Flex, Image, Box, CloseButton, FlexProps } from '@chakra-ui/react'; import { useLoading } from '../../../hooks/useLoading'; type Props = FlexProps & { onClose: () => void; iconSrc?: string; title?: any; isLoading?: boolean; showMask?: boolean; }; const CustomRightDrawer = ({ onClose, iconSrc, title, maxW = ['90vw', '30vw'], top = 16, bottom = 0, children, isLoading, showMask = true, ...props }: Props) => { const { Loading } = useLoading(); return ( {iconSrc && ( <> {iconSrc.startsWith('/') ? ( ) : ( )} )} {title} {children} ); }; export default React.memo(CustomRightDrawer);