forked from github/plane
fix: modal size not changing when switching between modes (#3082)
This commit is contained in:
parent
de24b02a0a
commit
361ee16567
@ -27,18 +27,17 @@ export const ProjectAnalyticsModal: React.FC<Props> = observer((props) => {
|
|||||||
return (
|
return (
|
||||||
<Transition.Root appear show={isOpen} as={React.Fragment}>
|
<Transition.Root appear show={isOpen} as={React.Fragment}>
|
||||||
<Dialog as="div" className="relative z-20" onClose={handleClose}>
|
<Dialog as="div" className="relative z-20" onClose={handleClose}>
|
||||||
<div className="fixed inset-0 z-20 h-full w-full overflow-y-auto">
|
<Transition.Child
|
||||||
<Transition.Child
|
as={React.Fragment}
|
||||||
as={React.Fragment}
|
enter="transition-transform duration-300"
|
||||||
enter="transition-transform duration-300"
|
enterFrom="translate-x-full"
|
||||||
enterFrom="translate-x-full"
|
enterTo="translate-x-0"
|
||||||
enterTo="translate-x-0"
|
leave="transition-transform duration-200"
|
||||||
leave="transition-transform duration-200"
|
leaveFrom="translate-x-0"
|
||||||
leaveFrom="translate-x-0"
|
leaveTo="translate-x-full"
|
||||||
leaveTo="translate-x-full"
|
>
|
||||||
>
|
<Dialog.Panel className="fixed inset-0 z-20 h-full w-full overflow-y-auto">
|
||||||
{/* TODO: fix full screen mode */}
|
<div
|
||||||
<Dialog.Panel
|
|
||||||
className={`fixed right-0 top-0 z-20 h-full bg-custom-background-100 shadow-custom-shadow-md ${
|
className={`fixed right-0 top-0 z-20 h-full bg-custom-background-100 shadow-custom-shadow-md ${
|
||||||
fullScreen ? "w-full p-2" : "w-1/2"
|
fullScreen ? "w-full p-2" : "w-1/2"
|
||||||
}`}
|
}`}
|
||||||
@ -61,9 +60,9 @@ export const ProjectAnalyticsModal: React.FC<Props> = observer((props) => {
|
|||||||
projectDetails={projectDetails}
|
projectDetails={projectDetails}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Dialog.Panel>
|
</div>
|
||||||
</Transition.Child>
|
</Dialog.Panel>
|
||||||
</div>
|
</Transition.Child>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</Transition.Root>
|
</Transition.Root>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user