Update file manager design a bit
This commit is contained in:
parent
8bd518048e
commit
2824db7352
9 changed files with 184 additions and 152 deletions
8
resources/scripts/components/elements/Portal.tsx
Normal file
8
resources/scripts/components/elements/Portal.tsx
Normal 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!);
|
||||
};
|
Reference in a new issue