mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-05 08:12:29 -08:00
26 lines
733 B
TypeScript
26 lines
733 B
TypeScript
import classNames from 'classnames';
|
|
import { ReactChild } from 'react';
|
|
import ReactModal from 'react-modal';
|
|
|
|
export function EmptyModal({
|
|
children,
|
|
...props
|
|
}: { children?: ReactChild } & ReactModal.Props) {
|
|
return (
|
|
<ReactModal
|
|
{...props}
|
|
shouldCloseOnOverlayClick
|
|
shouldCloseOnEsc
|
|
overlayClassName={classNames(
|
|
'fixed top-0 right-0 left-0 bottom-0 flex flex-col justify-center items-center w-full h-full bg-background-90 bg-opacity-60 z-20'
|
|
)}
|
|
className={classNames(
|
|
props.className as string,
|
|
'items-center focus:ring-transparent focus:ring-offset-transparent focus:outline-transparent outline-none'
|
|
)}
|
|
>
|
|
{children}
|
|
</ReactModal>
|
|
);
|
|
}
|