diff --git a/resources/scripts/components/elements/Modal.tsx b/resources/scripts/components/elements/Modal.tsx index 88cc78f0c..c37669b02 100644 --- a/resources/scripts/components/elements/Modal.tsx +++ b/resources/scripts/components/elements/Modal.tsx @@ -3,11 +3,13 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes'; import { CSSTransition } from 'react-transition-group'; import Spinner from '@/components/elements/Spinner'; +import classNames from 'classnames'; export interface RequiredModalProps { visible: boolean; onDismissed: () => void; appear?: boolean; + top?: boolean; } type Props = RequiredModalProps & { @@ -18,7 +20,7 @@ type Props = RequiredModalProps & { children: React.ReactNode; } -export default ({ visible, appear, dismissable, showSpinnerOverlay, closeOnBackground = true, closeOnEscape = true, onDismissed, children }: Props) => { +export default ({ visible, appear, dismissable, showSpinnerOverlay, top = true, closeOnBackground = true, closeOnEscape = true, onDismissed, children }: Props) => { const [render, setRender] = useState(visible); const isDismissable = useMemo(() => { @@ -58,7 +60,7 @@ export default ({ visible, appear, dismissable, showSpinnerOverlay, closeOnBackg } } }}> -
+
{isDismissable &&
setRender(false)}> diff --git a/resources/scripts/components/server/users/EditSubuserModal.tsx b/resources/scripts/components/server/users/EditSubuserModal.tsx index 5c49edb28..bd6c0dfdb 100644 --- a/resources/scripts/components/server/users/EditSubuserModal.tsx +++ b/resources/scripts/components/server/users/EditSubuserModal.tsx @@ -45,7 +45,7 @@ const EditSubuserModal = forwardRef(({ subuser, ...pr const permissions = useStoreState((state: ApplicationStore) => state.permissions.data); return ( - +

{subuser ? `${canEditUser ? 'Modify' : 'View'} permissions for ${subuser.email}` diff --git a/resources/styles/components/modal.css b/resources/styles/components/modal.css index 5fdceaa87..550191c6b 100644 --- a/resources/styles/components/modal.css +++ b/resources/styles/components/modal.css @@ -6,9 +6,9 @@ & > .modal-container { @apply .relative .w-full .max-w-1/2 .m-auto .flex-col .flex; - /*&.top { + &.top { margin-top: 10%; - }*/ + } & > .modal-close-icon { @apply .absolute .pin-r .p-2 .text-white .cursor-pointer .opacity-50;