You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
13 KiB
1 line
13 KiB
2 years ago
|
{"ast":null,"code":"var _jsxFileName = \"/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/src/components/FormInput/index.js\",\n _s = $RefreshSig$();\n\n// it has style inside index.scss ---> // Start FormInput Component && end FormInput Component\nimport React from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport DateRangePicker from \"../DateRangePicker\";\nimport Input from \"../AnimatedInput/Input\";\nimport CustomSelectBox from \"../CustomSelectBox\";\nimport CustomSwitch from \"../CustomSwitch\";\nimport Button from \"../Button\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst FormInput = _ref => {\n _s();\n\n let {\n items\n } = _ref;\n const {\n register,\n getValues\n } = useForm();\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"w-fit min-w-[900px] h-[375px] flex flex-col mx-auto bg-surface p-4 border border-surfaceBorder rounded shadow\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"flex flex-row items-center h-full justify-between divide-x-2 divide-surfaceBorder divide-x-reverse\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"flex-grow flex-1 flex flex-col gap-y-4 px-4\",\n children: [/*#__PURE__*/_jsxDEV(Input, {\n register: register(\"firstName\"),\n label: \"\\u0646\\u0627\\u0645 \",\n type: \"text\",\n borderClassname: `border border-surfaceBorder `,\n inputClassname: `px-3 py-2 text-primary focus:bg-surface`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 19,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(Input, {\n register: register(\"lastName\"),\n label: \"\\u0646\\u0627\\u0645 \\u062E\\u0627\\u0646\\u0648\\u0627\\u062F\\u06AF\\u06CC\",\n type: \"text\",\n borderClassname: `border border-surfaceBorder `,\n inputClassname: `px-3 py-2 text-primary focus:bg-surface`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(Input, {\n register: register(\"birthYear\"),\n label: \"\\u062A\\u0627\\u0631\\u06CC\\u062E \\u062A\\u0648\\u0644\\u062F\",\n type: \"number\",\n borderClassname: `border border-surfaceBorder `,\n inputClassname: `px-3 py-2 text-primaryText focus:bg-surface`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(CustomSelectBox, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(CustomSwitch, {\n register: register(\"gender\"),\n className: \"flex-1 bg-surface border-surfaceBorder\" // defaultValue={activeUser?.gender}\n ,\n values: [\"خانم\", \"آقا\"]\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 18,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"flex-grow flex-1 flex flex-col gap-y-4 px-4\",\n children: [/*#__PURE__*/_jsxDEV(Input, {\n register: register(\"mobileNumber\"),\n label: \"\\u0634\\u0645\\u0627\\u0631\\u0647 \\u062A\\u0645\\u0627\\u0633\",\n type: \"number\",\n borderClassname: `border border-surfaceBorder `,\n inputClassname: `px-3 py-2 text-primaryText focus:bg-surface`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(Input, {\n register: register(\"job\"),\n label: \"\\u0634\\u063A\\u0644\",\n type: \"text\",\n borderClassname: `border border-surfaceBorder `,\n inputClassna
|