sprint-asia-custom-component 0.1.157 → 0.1.159

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sprint-asia-custom-component",
3
3
  "main": "dist/index.js",
4
- "version": "0.1.157",
4
+ "version": "0.1.159",
5
5
  "private": false,
6
6
  "dependencies": {
7
7
  "@headlessui/react": "^1.7.18",
@@ -12,6 +12,7 @@ const DropdownPhone = ({
12
12
  footer = null,
13
13
  mode = "default",
14
14
  placeholder = "",
15
+ redeemType = "",
15
16
  }) => {
16
17
  const [isOpen, setIsOpen] = useState(false);
17
18
  const wrapperRef = useRef(null);
@@ -77,7 +78,11 @@ const DropdownPhone = ({
77
78
  >
78
79
  <div
79
80
  className="flex items-center px-3 py-2 cursor-pointer border-r border-neutral50 mr-3"
80
- onClick={() => setIsOpen(!isOpen)}
81
+ onClick={() => {
82
+ if (redeemType !== "ppob") {
83
+ setIsOpen(!isOpen);
84
+ }
85
+ }}
81
86
  >
82
87
  <img
83
88
  src={`https://flagcdn.com/w40/${dropdownCountry.value}.png`}
@@ -103,7 +108,7 @@ const DropdownPhone = ({
103
108
  />
104
109
  </div>
105
110
 
106
- {isOpen && (
111
+ {isOpen && redeemType !== "ppob" && (
107
112
  <div
108
113
  className="absolute top-full mt-1 z-10 rounded-md shadow-md bg-neutral20 ring-1 ring-black ring-opacity-5 overflow-y-auto max-h-64 no-scrollbar"
109
114
  style={{ width: wrapperWidth }}