infinity-forge 0.3.0 → 0.3.1
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/ui/components/form/input-control/error/index.d.ts +1 -1
- package/dist/ui/components/form/input-control/error/index.js +8 -2
- package/dist/ui/components/form/input-control/error/index.js.map +1 -1
- package/dist/ui/components/form/input-control/error/styles.js +1 -1
- package/dist/ui/components/form/input-control/error/styles.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { InputProps } from '../../interfaces.js';
|
|
2
|
-
export declare function ErrorMessage({ name
|
|
2
|
+
export declare function ErrorMessage({ name }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -25,10 +25,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ErrorMessage = void 0;
|
|
27
27
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
var formik_1 = require("formik");
|
|
28
29
|
var S = __importStar(require("./styles.js"));
|
|
29
30
|
function ErrorMessage(_a) {
|
|
30
|
-
var name = _a.name
|
|
31
|
-
|
|
31
|
+
var name = _a.name;
|
|
32
|
+
var errors = (0, formik_1.useFormikContext)().errors;
|
|
33
|
+
var error = errors[name];
|
|
34
|
+
if (!error) {
|
|
35
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
36
|
+
}
|
|
37
|
+
return ((0, jsx_runtime_1.jsx)(S.ErrorMessage, { className: 'error-message', children: (0, jsx_runtime_1.jsx)("span", { className: 'font-14-medium', children: error }) }));
|
|
32
38
|
}
|
|
33
39
|
exports.ErrorMessage = ErrorMessage;
|
|
34
40
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/input-control/error/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/input-control/error/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAyC;AAGzC,0CAA6B;AAE7B,SAAgB,YAAY,CAAC,EAAoB;QAAlB,IAAI,UAAA;IACzB,IAAA,MAAM,GAAK,IAAA,yBAAgB,GAAE,OAAvB,CAAuB;IAErC,IAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAE3B,IAAG,CAAC,KAAK,EAAE,CAAC;QACV,OAAO,kDAAK,CAAA;IACd,CAAC;IAED,OAAO,CACL,uBAAC,CAAC,CAAC,YAAY,IAAC,SAAS,EAAC,eAAe,YACvC,iCAAM,SAAS,EAAC,gBAAgB,YAAE,KAAK,GAAQ,GAChC,CAClB,CAAA;AACH,CAAC;AAdD,oCAcC"}
|
|
@@ -9,6 +9,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.ErrorMessage = void 0;
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
exports.ErrorMessage = (0, styled_components_1.default)("div")(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: red;\n margin-top: 3px;\n text-align: left;\n"], ["\n color: red;\n margin-top: 3px;\n text-align: left;\n"])));
|
|
12
|
+
exports.ErrorMessage = (0, styled_components_1.default)("div")(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: red;\n margin-top: 3px;\n padding-left: 5px;\n text-align: left;\n"], ["\n color: red;\n margin-top: 3px;\n padding-left: 5px;\n text-align: left;\n"])));
|
|
13
13
|
var templateObject_1;
|
|
14
14
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/input-control/error/styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAuC;AAE1B,QAAA,YAAY,GAAG,IAAA,2BAAM,EAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/input-control/error/styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAuC;AAE1B,QAAA,YAAY,GAAG,IAAA,2BAAM,EAAC,KAAK,CAAC,6JAAA,0FAKxC,KAAA"}
|