From db73f498f647aefa7a0075705cece8eaa4b92b42 Mon Sep 17 00:00:00 2001 From: Sergey Elpashev Date: Mon, 5 May 2025 15:15:25 +0300 Subject: [PATCH] feat: style improvements --- src/components/ModalCalendar.tsx | 15 ++-- src/components/ModalTags.tsx | 15 +++- src/components/ui/Dialog.tsx | 11 ++- src/components/ui/Modal.tsx | 2 +- src/pages/profile_tasks.module.scss | 2 +- src/pages/profile_tasks.tsx | 102 ++++++++++++++++++++++------ 6 files changed, 109 insertions(+), 38 deletions(-) diff --git a/src/components/ModalCalendar.tsx b/src/components/ModalCalendar.tsx index 891e100..b5ea2f1 100644 --- a/src/components/ModalCalendar.tsx +++ b/src/components/ModalCalendar.tsx @@ -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>; onClose?: () => void; @@ -27,10 +27,18 @@ const TRANSITIONS = { }, }; -const ModalCalendar: FunctionComponent = ({ isOpen, setIsOpen, onClose, onChange, value }) => { +const ModalCalendar: FunctionComponent = ({ + isOpen, + setIsOpen, + onClose, + onChange, + value, + ...rest +}) => { const [showTime, setShowTime] = useState(false); return ( { @@ -38,7 +46,6 @@ const ModalCalendar: FunctionComponent = ({ isOpen, setIsOpe setShowTime(false); }} className="md:h-[40rem] md:w-[30rem]" - zIndex={60} >
>; onClose?: () => void; @@ -22,7 +22,15 @@ interface ModalTagsProps { }; } -const ModalTags: FunctionComponent = ({ isOpen, setIsOpen, onClose, onChange, value, tagsList }) => { +const ModalTags: FunctionComponent = ({ + isOpen, + setIsOpen, + onClose, + onChange, + value, + tagsList, + ...rest +}) => { const [showFirstTags, setShowFirstTags] = useState(false); const [showSecondTags, setShowSecondTags] = useState(false); useEffect(() => { @@ -34,6 +42,7 @@ const ModalTags: FunctionComponent = ({ isOpen, setIsOpen, onClo return ( { onClose!(); diff --git a/src/components/ui/Dialog.tsx b/src/components/ui/Dialog.tsx index 1cbe407..a6090a6 100644 --- a/src/components/ui/Dialog.tsx +++ b/src/components/ui/Dialog.tsx @@ -23,15 +23,12 @@ const Dialog: FunctionComponent = ({ if (!isOpen) return null; return ( -
+

{title}

-

{content}

+

{content}

-