UNPKG

@ducor/react

Version:

admin template ui interface

9 lines (8 loc) 607 B
import { jsx as _jsx } from "react/jsx-runtime"; import Flex from "./flex"; import Box from "./box"; import { twMerge } from "tailwind-merge"; const OverlayScreen = ({ show = false, children, className, zIndex = 9999999999, }) => { return show ? (_jsx("div", { className: `bg-white fixed top-0 bottom-0 left-0 right-0 h-screen w-screen`, style: { zIndex }, children: _jsx(Flex, { align: 'center', justify: 'center', className: 'h-full', children: _jsx(Box, { className: twMerge("border p-4 rounded-md sm:w-full md:w-96", className), children: children }) }) })) : null; }; export default OverlayScreen;