UNPKG

@ducor/react

Version:

admin template ui interface

10 lines (9 loc) 775 B
import { jsx as _jsx } from "react/jsx-runtime"; import Flex from "./flex"; import Box from "./box"; import { twMerge } from "tailwind-merge"; var OverlayScreen = function (_a) { var _b = _a.show, show = _b === void 0 ? false : _b, children = _a.children, _c = _a.size, size = _c === void 0 ? "sm" : _c, className = _a.className, _d = _a.zIndex, zIndex = _d === void 0 ? 9999999999 : _d; return show ? (_jsx("div", { className: "bg-white fixed top-0 bottom-0 left-0 right-0 h-screen w-screen", style: { zIndex: 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;