hi-tm 0.2.5 → 0.2.7

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.
@@ -51,10 +51,7 @@ const react_1 = __importStar(require("react"));
51
51
  *
52
52
  * @returns {React.JSX.Element} - A React component for a toggle switch.
53
53
  */
54
- const Toggle = ({ label, value, textError, onChangeValueHandler, style = {
55
- margin: "mt-2",
56
- width: "w-full",
57
- }, }) => {
54
+ const Toggle = ({ label, value, textError, onChangeValueHandler, style, }) => {
58
55
  const [isChecked, setIsChecked] = (0, react_1.useState)(value ?? false);
59
56
  const handleToggle = () => {
60
57
  const newValue = !isChecked;
@@ -71,7 +68,7 @@ const Toggle = ({ label, value, textError, onChangeValueHandler, style = {
71
68
  return textError === "" || textError === null || textError.trim() === "";
72
69
  };
73
70
  return (react_1.default.createElement(react_1.default.Fragment, null,
74
- react_1.default.createElement("div", { onClick: handleToggle, className: `bg-primaryBackGroundWhite cursor-pointer text-primaryTextColor flex flex-row items-center justify-between border border-solid border-gray-secondary h-12 px-4 rounded-2xl ${style.margin} ${style.width}` },
71
+ react_1.default.createElement("div", { onClick: handleToggle, style: style, className: `bg-primaryBackGroundWhite cursor-pointer text-primaryTextColor flex flex-row items-center justify-between border border-solid border-gray-secondary h-12 px-4 rounded-2xl ` },
75
72
  react_1.default.createElement("div", { className: `w-full relative flex flex-row items-center justify-between gap-4 py-2 md:py-0 select-none-custom ` },
76
73
  label,
77
74
  react_1.default.createElement("div", { className: "absolute left-0 inline-block w-8 h-4 rounded-full cursor-pointer" },
@@ -4,8 +4,5 @@ export interface TogglePropsType {
4
4
  textError: string | null;
5
5
  value: true | false | null;
6
6
  onChangeValueHandler: (newValue: boolean) => void;
7
- style?: {
8
- width?: string;
9
- margin?: string;
10
- } & React.CSSProperties;
7
+ style?: React.CSSProperties;
11
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hi-tm",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "styles": "dist/styles/globals.css",
5
5
  "main": "dist/index.js",
6
6
  "exports": {