sprint-asia-custom-component 0.1.159 → 0.1.161
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
CHANGED
|
@@ -29144,6 +29144,7 @@
|
|
|
29144
29144
|
|
|
29145
29145
|
const TextInput = ({
|
|
29146
29146
|
title = "",
|
|
29147
|
+
rightComponent = null,
|
|
29147
29148
|
leftIcon = null,
|
|
29148
29149
|
rightIcon = null,
|
|
29149
29150
|
placeholder = "",
|
|
@@ -29172,13 +29173,15 @@
|
|
|
29172
29173
|
};
|
|
29173
29174
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29174
29175
|
className: `w-full ${className}`
|
|
29176
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29177
|
+
className: "flex justify-between w-full items-center"
|
|
29175
29178
|
}, title && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29176
29179
|
className: "flex"
|
|
29177
29180
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
29178
29181
|
className: "text-sm font-normal text-black mb-1"
|
|
29179
29182
|
}, title), isRequired && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
29180
29183
|
className: "text-sm font-normal text-danger500 ml-1"
|
|
29181
|
-
}, "*")), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29184
|
+
}, "*")), rightComponent && /*#__PURE__*/React__default["default"].createElement("div", null, rightComponent)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
29182
29185
|
className: "relative rounded-md"
|
|
29183
29186
|
}, /*#__PURE__*/React__default["default"].createElement("section", {
|
|
29184
29187
|
className: "absolute inset-y-0 left-0 pl-2 flex items-center justify-center gap-2"
|
|
@@ -51927,7 +51930,7 @@
|
|
|
51927
51930
|
className: "w-4 h-4 object-cover rounded-full"
|
|
51928
51931
|
}), /*#__PURE__*/React__default["default"].createElement("p", {
|
|
51929
51932
|
className: "text-sm font-bold text-neutral300 ml-3 mr-2"
|
|
51930
|
-
}, dropdownCountry.option), isOpen ? /*#__PURE__*/React__default["default"].createElement(PiCaretUp, null) : /*#__PURE__*/React__default["default"].createElement(PiCaretDown, null)), /*#__PURE__*/React__default["default"].createElement("input", {
|
|
51933
|
+
}, dropdownCountry.option), redeemType !== "ppob" && (isOpen ? /*#__PURE__*/React__default["default"].createElement(PiCaretUp, null) : /*#__PURE__*/React__default["default"].createElement(PiCaretDown, null))), /*#__PURE__*/React__default["default"].createElement("input", {
|
|
51931
51934
|
type: "number",
|
|
51932
51935
|
value: value,
|
|
51933
51936
|
onChange: onChangeInput,
|
package/package.json
CHANGED
|
@@ -92,7 +92,7 @@ const DropdownPhone = ({
|
|
|
92
92
|
<p className="text-sm font-bold text-neutral300 ml-3 mr-2">
|
|
93
93
|
{dropdownCountry.option}
|
|
94
94
|
</p>
|
|
95
|
-
{isOpen ? <PiCaretUp /> : <PiCaretDown />}
|
|
95
|
+
{redeemType !== "ppob" && (isOpen ? <PiCaretUp /> : <PiCaretDown />)}
|
|
96
96
|
</div>
|
|
97
97
|
|
|
98
98
|
<input
|
|
@@ -3,6 +3,7 @@ import { PiEyeClosedLight, PiEye, PiInfo } from "react-icons/pi";
|
|
|
3
3
|
|
|
4
4
|
const TextInput = ({
|
|
5
5
|
title = "",
|
|
6
|
+
rightComponent = null,
|
|
6
7
|
leftIcon = null,
|
|
7
8
|
rightIcon = null,
|
|
8
9
|
placeholder = "",
|
|
@@ -16,7 +17,7 @@ const TextInput = ({
|
|
|
16
17
|
rightAdornment,
|
|
17
18
|
leftAdornment,
|
|
18
19
|
minimum,
|
|
19
|
-
maximum
|
|
20
|
+
maximum,
|
|
20
21
|
}) => {
|
|
21
22
|
const [isFocused, setIsFocused] = useState(false);
|
|
22
23
|
const [showPassword, setShowPassword] = useState(false);
|
|
@@ -35,12 +36,17 @@ const TextInput = ({
|
|
|
35
36
|
|
|
36
37
|
return (
|
|
37
38
|
<div className={`w-full ${className}`}>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
<div className="flex justify-between w-full items-center">
|
|
40
|
+
{title && (
|
|
41
|
+
<div className="flex">
|
|
42
|
+
<p className="text-sm font-normal text-black mb-1">{title}</p>
|
|
43
|
+
{isRequired && <p className="text-sm font-normal text-danger500 ml-1">*</p>}
|
|
44
|
+
</div>
|
|
45
|
+
)}
|
|
46
|
+
{
|
|
47
|
+
rightComponent && <div>{rightComponent}</div>
|
|
48
|
+
}
|
|
49
|
+
</div>
|
|
44
50
|
|
|
45
51
|
<div className="relative rounded-md">
|
|
46
52
|
<section className="absolute inset-y-0 left-0 pl-2 flex items-center justify-center gap-2">
|
package/src/templates/index.js
CHANGED
|
@@ -1598,6 +1598,8 @@ const Templates = () => {
|
|
|
1598
1598
|
|
|
1599
1599
|
<div className="m-9"></div>
|
|
1600
1600
|
<p className="text-black font-bold text-2xl text-center py-2">Text Input</p>
|
|
1601
|
+
<TextInput title="Default Input" placeholder="Type something..." value={inputValue} onChange={setInputValue} rightComponent={<div className="flex items-center mb-2"><Switch /><p className="ml-2">Auto</p></div>}/>
|
|
1602
|
+
|
|
1601
1603
|
<TextInput title="Default Input" placeholder="Type something..." value={inputValue} onChange={setInputValue} />
|
|
1602
1604
|
|
|
1603
1605
|
<TextInput
|