@dxos/react-ui 0.3.7-main.8c7953e → 0.3.7-main.8f93ef7
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.
|
@@ -919,7 +919,8 @@ var Checkbox = /* @__PURE__ */ forwardRef10(({ __inputScope, checked: propsCheck
|
|
|
919
919
|
})
|
|
920
920
|
})));
|
|
921
921
|
});
|
|
922
|
-
var Switch = /* @__PURE__ */ forwardRef10(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size, classNames, ...props }, forwardedRef) => {
|
|
922
|
+
var Switch = /* @__PURE__ */ forwardRef10(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size = 5, classNames, ...props }, forwardedRef) => {
|
|
923
|
+
const { tx } = useThemeContext();
|
|
923
924
|
const [checked, onCheckedChange] = useControllableState({
|
|
924
925
|
prop: propsChecked,
|
|
925
926
|
defaultProp: propsDefaultChecked,
|
|
@@ -936,11 +937,14 @@ var Switch = /* @__PURE__ */ forwardRef10(({ __inputScope, checked: propsChecked
|
|
|
936
937
|
"aria-invalid": "true",
|
|
937
938
|
"aria-errormessage": errorMessageId
|
|
938
939
|
},
|
|
939
|
-
|
|
940
|
-
|
|
940
|
+
className: tx("input.switch", "input--switch", {
|
|
941
|
+
size
|
|
942
|
+
}, classNames),
|
|
941
943
|
ref: forwardedRef
|
|
942
944
|
}, /* @__PURE__ */ React13.createElement(SwitchThumbPrimitive, {
|
|
943
|
-
className: "
|
|
945
|
+
className: tx("input.switchThumb", "input--switch__thumb", {
|
|
946
|
+
size
|
|
947
|
+
})
|
|
944
948
|
}));
|
|
945
949
|
});
|
|
946
950
|
var Input = {
|