diff --git a/src/components/Toast.tsx b/src/components/Toast.tsx deleted file mode 100644 index 4e18c46af..000000000 --- a/src/components/Toast.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { FC, useState } from 'react'; -import classNames from 'classnames'; -import { HiX } from 'react-icons/hi'; - -type Duration = 75 | 100 | 150 | 200 | 300 | 500 | 1000; - -export type ToastComponentProps = { - className?: string; - duration?: Duration; -}; - -const durationClasses: Record = { - 75: 'duration-75', - 100: 'duration-100', - 150: 'duration-150', - 200: 'duration-200', - 300: 'duration-300', - 500: 'duration-500', - 1000: 'duration-1000', -}; - -const ToastComponent: FC = ({ children, className, duration = 300 }) => { - const [close, setClose] = useState(false); - const [remove, setRemove] = useState(false); - - const handleClick = () => { - setClose(!close); - setTimeout(() => setRemove(!remove), duration); - }; - - return ( -
- {children} - -
- ); -}; - -ToastComponent.displayName = 'Toast'; - -export const Toast = Object.assign(ToastComponent, {});