import dynamic from 'next/dynamic'; import { Flex, Icon, IconButton } from '@chakra-ui/react'; import { AnimatePresence } from 'framer-motion'; import { AnimatedDiv } from '~/components'; import { useColorValue } from '~/context'; import { useLGState, useOpposingColor } from '~/hooks'; import type { TResetButton } from './types'; const LeftArrow = dynamic(() => import('@meronex/icons/fa').then(i => i.FaAngleLeft)); export const ResetButton: React.FC = (props: TResetButton) => { const { developerMode, resetForm, ...rest } = props; const { isSubmitting } = useLGState(); const bg = useColorValue('primary.500', 'primary.300'); const color = useOpposingColor(bg); return ( {isSubmitting.value && ( } /> )} ); };