fix: toggle alligment (#4361)

This commit is contained in:
Udit Takkar authored and GitHub committed 2022-09-10 19:34:38 +02:00
1 parent 3ce687c0a4
commit c215f7de03
2 files changed
+17 -7

No files matched your search

+2 -1
View File
@@ -11,13 +11,14 @@ const Switch = (
thumbProps?: {
className?: string;
};
fitToHeight?: boolean;
}
) => {
const { label, ...primitiveProps } = props;
const id = useId();
return (
<div className="flex h-auto w-auto flex-row items-center">
<div className={classNames("flex h-auto w-auto flex-row items-center", props.fitToHeight && "h-fit")}>
<PrimitiveSwitch.Root
className={classNames(
props.checked ? "bg-gray-900" : "bg-gray-200 hover:bg-gray-300",