@rocket.chat/fuselage 0.6.3-dev.415 → 0.6.3-dev.416
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeSnippet.d.ts","sourceRoot":"","sources":["../../../src/components/CodeSnippet/CodeSnippet.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"CodeSnippet.d.ts","sourceRoot":"","sources":["../../../src/components/CodeSnippet/CodeSnippet.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAI7B,aAAK,gBAAgB,GAAG,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,WAAW,gDAKd,gBAAgB,KAAG,aAAa,gBAAgB,CAuBlD,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -9128,6 +9128,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9128
9128
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
9129
9129
|
/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Box */ "./src/components/Box/index.js");
|
|
9130
9130
|
/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Button */ "./src/components/Button/index.ts");
|
|
9131
|
+
/* harmony import */ var _Skeleton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Skeleton */ "./src/components/Skeleton/index.tsx");
|
|
9131
9132
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
9132
9133
|
__assign = Object.assign || function(t) {
|
|
9133
9134
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -9153,12 +9154,17 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
9153
9154
|
|
|
9154
9155
|
|
|
9155
9156
|
|
|
9157
|
+
|
|
9156
9158
|
var CodeSnippet = function (_a) {
|
|
9157
9159
|
var children = _a.children, onClick = _a.onClick, _b = _a.buttonText, buttonText = _b === void 0 ? 'Copy' : _b, props = __rest(_a, ["children", "onClick", "buttonText"]);
|
|
9160
|
+
if (!children) {
|
|
9161
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, __assign({ is: 'pre', "rcx-code-snippet": true }, props),
|
|
9162
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Skeleton__WEBPACK_IMPORTED_MODULE_3__.Skeleton, { w: '100%' })));
|
|
9163
|
+
}
|
|
9158
9164
|
return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, __assign({ is: 'pre', "rcx-code-snippet": true }, props),
|
|
9159
9165
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, { "rcx-code-snippet__codebox": true },
|
|
9160
9166
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("code", null, children)),
|
|
9161
|
-
onClick && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, null,
|
|
9167
|
+
onClick && children && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__.Box, null,
|
|
9162
9168
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Button__WEBPACK_IMPORTED_MODULE_2__.Button, { small: true, primary: true, onClick: onClick }, buttonText)))));
|
|
9163
9169
|
};
|
|
9164
9170
|
/* harmony default export */ __webpack_exports__["default"] = (CodeSnippet);
|