dsql-admin/dsql-app/.local_dist/server/chunks/75.js

66 lines
3.3 KiB
JavaScript
Raw Normal View History

2024-11-05 11:12:42 +00:00
"use strict";
exports.id = 75;
exports.ids = [75];
exports.modules = {
/***/ 4739:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Z": () => (/* binding */ DatabaseSlugCopy)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(997);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6689);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _mui_icons_material_CopyAllTwoTone__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5050);
/* harmony import */ var _mui_icons_material_CopyAllTwoTone__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_CopyAllTwoTone__WEBPACK_IMPORTED_MODULE_2__);
// @ts-check
/**
* Imports
* ==============================================================================
*/
// import DifferenceOutlinedIcon from "@mui/icons-material/DifferenceOutlined";
/** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /** ****************************************************************************** */ /**
* Main Component { Functional }
* ==============================================================================
* @param {{
* slugText: string,
* smaller?: boolean,
* outlined?: boolean,
2024-11-06 06:52:57 +00:00
* full?:boolean
2024-11-05 11:12:42 +00:00
* }} props - React component props including { children }
2024-11-06 06:52:57 +00:00
*/ function DatabaseSlugCopy({ slugText , smaller , outlined , full , }) {
2024-11-05 11:12:42 +00:00
return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", {
2024-11-06 06:52:57 +00:00
className: "button break-words text-wrap cancel-link " + (outlined ? " outlined gray" : "light-gray") + (smaller ? " small-text" : ""),
2024-11-05 11:12:42 +00:00
onClick: (e)=>{
navigator.clipboard.writeText(slugText).then(()=>{
2024-11-06 06:52:57 +00:00
alert(`${full ? "Database Full name" : "Database Slug"} "${slugText}" Copied to Clipboard. Use this as the database name when querying data`);
2024-11-05 11:12:42 +00:00
});
},
2024-11-06 06:52:57 +00:00
style: {
wordWrap: "break-word",
wordBreak: "break-all"
},
2024-11-05 11:12:42 +00:00
children: [
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((_mui_icons_material_CopyAllTwoTone__WEBPACK_IMPORTED_MODULE_2___default()), {
color: "action",
sx: {
opacity: 0.5,
fontSize: 15
}
}),
/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("span", {
children: slugText
})
]
});
}
/***/ })
};
;