lucentia-ui 0.2.6 → 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.
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styles from "./Switch.module.css";
|
|
3
|
-
export const Switch = ({ checked, defaultChecked, onChange, disabled = false, id, name, }) => {
|
|
4
|
-
|
|
3
|
+
export const Switch = ({ checked, defaultChecked, onChange, onCheckedChange, disabled = false, id, name, }) => {
|
|
4
|
+
const handleChange = (e) => {
|
|
5
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
6
|
+
onCheckedChange === null || onCheckedChange === void 0 ? void 0 : onCheckedChange(e.target.checked);
|
|
7
|
+
};
|
|
8
|
+
return (_jsxs("label", { className: styles.switch, children: [_jsx("input", { type: "checkbox", role: "switch", id: id, name: name, checked: checked, defaultChecked: defaultChecked, onChange: handleChange, disabled: disabled }), _jsx("span", { className: styles.slider })] }));
|
|
5
9
|
};
|
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
--space-3xl: 48px;
|
|
46
46
|
--space-4xl: 64px;
|
|
47
47
|
--space-5xl: 96px;
|
|
48
|
-
--gap:
|
|
48
|
+
--gap-sm: 16px;
|
|
49
|
+
--gap-md: 32px;
|
|
50
|
+
--gap-lg: 64px;
|
|
49
51
|
|
|
50
52
|
/* ===== Layout ===== */
|
|
51
53
|
--container: 1120px;
|
|
@@ -128,7 +130,7 @@
|
|
|
128
130
|
--color-background: #2b3a38;
|
|
129
131
|
--color-on-background: #dde4e3;
|
|
130
132
|
|
|
131
|
-
--color-surface: #
|
|
133
|
+
--color-surface: #2b3a38bf;
|
|
132
134
|
--color-on-surface: #dde4e3;
|
|
133
135
|
--color-on-surface-variant: #dde4e380;
|
|
134
136
|
--color-surface-container: #262d2d;
|
package/package.json
CHANGED