import { Modal, Note, Spacer, Input } from "@geist-ui/core" import { useCallback, useState } from "react" import DatePicker from 'react-datepicker'; // import "react-datepicker/dist/react-datepicker.css"; import styles from './modal.module.css' type Props = { isOpen: boolean onClose: () => void onSubmit: (expiresAt: Date) => void } const ExpirationModal = ({ isOpen, onClose, onSubmit: onSubmitAfterVerify }: Props) => { const [error, setError] = useState() const [date, setDate] = useState(new Date()); const onSubmit = () => { onSubmitAfterVerify(date) } const onDateChange = (date: Date) => { setDate(date) } const CustomTimeInput = ({ value, onChange }: { date: Date, value: string, onChange: (date: string) => void }) => { return ( onChange(e.target.value)} htmlType="time" />) } return (<> {/* TODO: investigate disableBackdropClick not updating state? */} { Enter an expiration time } showTimeInput={true} // @ts-ignore customTimeInput={} timeInputLabel="Time:" dateFormat="MM/dd/yyyy h:mm aa" /> Cancel Submit } ) } export default ExpirationModal