sprint-asia-custom-component 0.1.182 → 0.1.183

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
@@ -45186,10 +45186,10 @@
45186
45186
  }
45187
45187
  };
45188
45188
  return /*#__PURE__*/React__default["default"].createElement("div", {
45189
- className: `relative inline-block ${checked ? 'bg-primary500' : 'bg-neutral40'} rounded-full w-12 h-6 transition-all duration-300 ${isEdit ? "cursor-pointer" : "cursor-default"}`,
45189
+ className: `relative inline-block ${checked ? "bg-primary500" : "bg-neutral40"} rounded-full w-12 h-6 transition-all duration-300 ${isEdit ? "cursor-pointer opacity-100" : "cursor-not-allowed opacity-50"}`,
45190
45190
  onClick: handleClick
45191
45191
  }, /*#__PURE__*/React__default["default"].createElement("div", {
45192
- className: `absolute flex items-center justify-center w-6 h-6 transition-all duration-300 ${checked ? 'right-0' : 'left-0'}`
45192
+ className: `absolute flex items-center justify-center w-6 h-6 transition-all duration-300 ${checked ? "right-0" : "left-0"}`
45193
45193
  }, /*#__PURE__*/React__default["default"].createElement("div", {
45194
45194
  className: `w-4 h-4 bg-white rounded-full shadow-md transition-all`
45195
45195
  })));
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.182",
4
+ "version": "0.1.183",
5
5
  "private": false,
6
6
  "dependencies": {
7
7
  "@headlessui/react": "^1.7.18",
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
 
3
3
  const Switch = ({ onChange, checked, isEdit }) => {
4
4
  const handleClick = () => {
@@ -9,12 +9,17 @@ const Switch = ({ onChange, checked, isEdit }) => {
9
9
 
10
10
  return (
11
11
  <div
12
- className={`relative inline-block ${checked ? 'bg-primary500' : 'bg-neutral40'} rounded-full w-12 h-6 transition-all duration-300 ${isEdit ? "cursor-pointer" : "cursor-default"}`}
12
+ className={`relative inline-block ${
13
+ checked ? "bg-primary500" : "bg-neutral40"
14
+ } rounded-full w-12 h-6 transition-all duration-300 ${
15
+ isEdit ? "cursor-pointer opacity-100" : "cursor-not-allowed opacity-50"
16
+ }`}
13
17
  onClick={handleClick}
14
18
  >
15
19
  <div
16
20
  className={`absolute flex items-center justify-center w-6 h-6 transition-all duration-300 ${
17
- checked ? 'right-0' : 'left-0'}`}
21
+ checked ? "right-0" : "left-0"
22
+ }`}
18
23
  >
19
24
  <div className={`w-4 h-4 bg-white rounded-full shadow-md transition-all`}></div>
20
25
  </div>
@@ -22,4 +27,4 @@ const Switch = ({ onChange, checked, isEdit }) => {
22
27
  );
23
28
  };
24
29
 
25
- export default Switch;
30
+ export default Switch;