Update schedule view UI
This commit is contained in:
parent
33a43de723
commit
f33d0b1d72
12 changed files with 230 additions and 134 deletions
|
@ -1,9 +1,10 @@
|
|||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import Spinner from '@/components/elements/Spinner';
|
||||
import tw from 'twin.macro';
|
||||
import styled, { css } from 'styled-components/macro';
|
||||
import { breakpoint } from '@/theme';
|
||||
import Fade from '@/components/elements/Fade';
|
||||
import { createPortal } from 'react-dom';
|
||||
|
||||
export interface RequiredModalProps {
|
||||
visible: boolean;
|
||||
|
@ -124,4 +125,10 @@ const Modal: React.FC<ModalProps> = ({ visible, appear, dismissable, showSpinner
|
|||
);
|
||||
};
|
||||
|
||||
export default Modal;
|
||||
const PortaledModal: React.FC<ModalProps> = ({ children, ...props }) => {
|
||||
const element = useRef(document.getElementById('modal-portal'));
|
||||
|
||||
return createPortal(<Modal {...props}>{children}</Modal>, element.current!);
|
||||
};
|
||||
|
||||
export default PortaledModal;
|
||||
|
|
Reference in a new issue