import { Button } from '@gear-js/ui'; import { ReactNode } from 'react'; import { useForm, FormProvider, FieldValues, DefaultValues } from 'react-hook-form'; import { CSSTransition } from 'react-transition-group'; import { AnimationTimeout } from '@/shared/config'; import styles from './Filters.module.scss'; type Props = { initialValues: DefaultValues; onSubmit: (values: T) => void; children: ReactNode; title?: string; }; const Filters = ({ initialValues, children, onSubmit, title = 'Filters' }: Props) => { const methods = useForm({ defaultValues: initialValues }); const { handleSubmit, reset, formState } = methods; const { isDirty } = formState; const handleResetClick = () => { reset(); handleSubmit(onSubmit)(); }; return (

{title}

{children}
); }; export { Filters };