hrnet-modal-p14
Version:
A package for the project 14 of OpenClassrooms called HrNet
9 lines • 841 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import XSVG from './x.js';
import { Button } from './Button.js';
export const Dialog = ({ children, buttonFunction, ...props }) => {
const dialogClasses = `bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-[425px]`;
return (_jsxs("div", { className: dialogClasses, ...props, children: [children, _jsx(Button, { onClick: buttonFunction, buttonUtility: "Close", children: _jsx(XSVG, {}) })] }));
};
//# sourceMappingURL=Dialog.js.map