feat: style improvements
This commit is contained in:
@@ -5,9 +5,9 @@ import { Dispatch, StateUpdater, useState } from "preact/hooks";
|
||||
import { Calendar, CalendarPassThroughMethodOptions } from "primereact/calendar";
|
||||
import { FormEvent } from "primereact/ts-helpers";
|
||||
import Button from "./ui/Button";
|
||||
import ModalWindow from "./ui/Modal";
|
||||
import ModalWindow, { ModalWindowProps } from "./ui/Modal";
|
||||
|
||||
interface ModalCalendarProps {
|
||||
interface ModalCalendarProps extends ModalWindowProps {
|
||||
isOpen?: boolean;
|
||||
setIsOpen?: Dispatch<StateUpdater<boolean>>;
|
||||
onClose?: () => void;
|
||||
@@ -27,10 +27,18 @@ const TRANSITIONS = {
|
||||
},
|
||||
};
|
||||
|
||||
const ModalCalendar: FunctionComponent<ModalCalendarProps> = ({ isOpen, setIsOpen, onClose, onChange, value }) => {
|
||||
const ModalCalendar: FunctionComponent<ModalCalendarProps> = ({
|
||||
isOpen,
|
||||
setIsOpen,
|
||||
onClose,
|
||||
onChange,
|
||||
value,
|
||||
...rest
|
||||
}) => {
|
||||
const [showTime, setShowTime] = useState(false);
|
||||
return (
|
||||
<ModalWindow
|
||||
{...rest}
|
||||
isOpen={isOpen}
|
||||
setIsOpen={setIsOpen}
|
||||
onClose={() => {
|
||||
@@ -38,7 +46,6 @@ const ModalCalendar: FunctionComponent<ModalCalendarProps> = ({ isOpen, setIsOpe
|
||||
setShowTime(false);
|
||||
}}
|
||||
className="md:h-[40rem] md:w-[30rem]"
|
||||
zIndex={60}
|
||||
>
|
||||
<div class="w-full flex-1 self-start">
|
||||
<Calendar
|
||||
|
||||
Reference in New Issue
Block a user