pixelize-design-library 1.1.86 → 1.1.88
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,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare const TextLabel: ({ label, id, isRequired, }: {
|
|
2
|
+
export declare const TextLabel: ({ label, id, isRequired, isInformation, informationMessage, }: {
|
|
3
3
|
label: string;
|
|
4
4
|
id?: string | undefined;
|
|
5
5
|
isInformation?: boolean | undefined;
|
|
6
6
|
informationMessage?: string | undefined;
|
|
7
|
-
isRequired
|
|
7
|
+
isRequired?: boolean | undefined;
|
|
8
8
|
}) => React.JSX.Element;
|
|
@@ -7,11 +7,16 @@ exports.TextLabel = void 0;
|
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var react_2 = require("@chakra-ui/react");
|
|
9
9
|
var useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
10
|
+
var lucide_react_1 = require("lucide-react");
|
|
10
11
|
var TextLabel = function (_a) {
|
|
11
|
-
var label = _a.label, id = _a.id, _b = _a.isRequired, isRequired = _b === void 0 ? false : _b;
|
|
12
|
+
var label = _a.label, id = _a.id, _b = _a.isRequired, isRequired = _b === void 0 ? false : _b, _c = _a.isInformation, isInformation = _c === void 0 ? false : _c, _d = _a.informationMessage, informationMessage = _d === void 0 ? "" : _d;
|
|
12
13
|
var theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
13
|
-
return (react_1.default.createElement(react_2.
|
|
14
|
-
label,
|
|
15
|
-
|
|
14
|
+
return (react_1.default.createElement(react_2.Box, { display: "flex", alignItems: "center", gap: "3px" },
|
|
15
|
+
react_1.default.createElement(react_2.FormLabel, { htmlFor: id !== null && id !== void 0 ? id : label, color: theme.colors.gray[600], mb: "0.1rem", fontWeight: 600, fontSize: 14 },
|
|
16
|
+
label,
|
|
17
|
+
isRequired && react_1.default.createElement("span", { style: { color: "red" } }, "*")),
|
|
18
|
+
isInformation && informationMessage && (react_1.default.createElement(react_2.Tooltip, { label: informationMessage, hasArrow: true, placement: "top", bg: "gray.600", color: "white", fontSize: "10px" },
|
|
19
|
+
react_1.default.createElement(react_2.Box, { cursor: "pointer" },
|
|
20
|
+
react_1.default.createElement(react_2.Icon, { as: lucide_react_1.InfoIcon, color: "gray.500", boxSize: 4 }))))));
|
|
16
21
|
};
|
|
17
22
|
exports.TextLabel = TextLabel;
|