@serhii.olishevskyi/docs 1.2.11 → 1.2.12
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.
- package/dist/index.js +10 -1
- package/dist/index.mjs +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4528,6 +4528,7 @@ var PageLinkWidget = ({
|
|
|
4528
4528
|
|
|
4529
4529
|
// src/UI/components/inputs/SwitchComponent.tsx
|
|
4530
4530
|
var import_material22 = require("@mui/material");
|
|
4531
|
+
init_TranslateText();
|
|
4531
4532
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4532
4533
|
var SwitchComponent = ({
|
|
4533
4534
|
checked = false,
|
|
@@ -4540,6 +4541,14 @@ var SwitchComponent = ({
|
|
|
4540
4541
|
...props
|
|
4541
4542
|
}) => {
|
|
4542
4543
|
const currentLabel = label ?? (checked ? checkedLabel : uncheckedLabel);
|
|
4544
|
+
const renderLabel = (node) => {
|
|
4545
|
+
console.log(node);
|
|
4546
|
+
if (typeof node === "string") {
|
|
4547
|
+
console.log("string");
|
|
4548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TranslateText, { overrideNamespace, children: node });
|
|
4549
|
+
}
|
|
4550
|
+
return node;
|
|
4551
|
+
};
|
|
4543
4552
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_material22.Box, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4544
4553
|
import_material22.FormControlLabel,
|
|
4545
4554
|
{
|
|
@@ -4551,7 +4560,7 @@ var SwitchComponent = ({
|
|
|
4551
4560
|
...switchProps
|
|
4552
4561
|
}
|
|
4553
4562
|
),
|
|
4554
|
-
label: currentLabel,
|
|
4563
|
+
label: renderLabel(currentLabel),
|
|
4555
4564
|
...props
|
|
4556
4565
|
}
|
|
4557
4566
|
) });
|
package/dist/index.mjs
CHANGED
|
@@ -1809,6 +1809,14 @@ var SwitchComponent = ({
|
|
|
1809
1809
|
...props
|
|
1810
1810
|
}) => {
|
|
1811
1811
|
const currentLabel = label ?? (checked ? checkedLabel : uncheckedLabel);
|
|
1812
|
+
const renderLabel = (node) => {
|
|
1813
|
+
console.log(node);
|
|
1814
|
+
if (typeof node === "string") {
|
|
1815
|
+
console.log("string");
|
|
1816
|
+
return /* @__PURE__ */ jsx12(TranslateText, { overrideNamespace, children: node });
|
|
1817
|
+
}
|
|
1818
|
+
return node;
|
|
1819
|
+
};
|
|
1812
1820
|
return /* @__PURE__ */ jsx12(Box6, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */ jsx12(
|
|
1813
1821
|
FormControlLabel,
|
|
1814
1822
|
{
|
|
@@ -1820,7 +1828,7 @@ var SwitchComponent = ({
|
|
|
1820
1828
|
...switchProps
|
|
1821
1829
|
}
|
|
1822
1830
|
),
|
|
1823
|
-
label: currentLabel,
|
|
1831
|
+
label: renderLabel(currentLabel),
|
|
1824
1832
|
...props
|
|
1825
1833
|
}
|
|
1826
1834
|
) });
|