Update file manager design a bit

This commit is contained in:
DaneEveritt 2022-06-20 14:16:42 -04:00
parent 8bd518048e
commit 2824db7352
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
9 changed files with 184 additions and 152 deletions

View file

@ -0,0 +1,8 @@
import React, { useRef } from 'react';
import { createPortal } from 'react-dom';
export default ({ children }: { children: React.ReactNode }) => {
const element = useRef(document.getElementById('modal-portal'));
return createPortal(children, element!.current!);
};

View file

@ -44,8 +44,8 @@ const Dialog = ({ open, title, description, onClose, hideCloseIcon, children }:
open={open}
onClose={onClose}
>
<div className={'fixed inset-0 bg-gray-900/50'}/>
<div className={'fixed inset-0 overflow-y-auto'}>
<div className={'fixed inset-0 bg-gray-900/50 z-40'}/>
<div className={'fixed inset-0 overflow-y-auto z-50'}>
<div className={'flex min-h-full items-center justify-center p-4 text-center'}>
<HDialog.Panel
as={motion.div}
@ -58,7 +58,7 @@ const Dialog = ({ open, title, description, onClose, hideCloseIcon, children }:
'ring-4 ring-gray-800 ring-opacity-80',
])}
>
<div className={'flex p-6'}>
<div className={'flex p-6 overflow-y-auto'}>
{icon && <div className={'mr-4'}>{icon}</div>}
<div className={'flex-1 max-h-[70vh]'}>
{title &&