Event Type: Title not displayed in the mobile view (#7451)

* Event Type: Title not displayed in the mobile view

* Fix toggle not updating in UI

---------

Co-authored-by: gitstart-calcom <[email protected]>
Co-authored-by: Hariom Balhara <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-04-19 13:17:54 -07:00
1 parent 0686c08de3
commit 877220caa0
23 files changed
+135 -39

No files matched your search

@@ -19,13 +19,14 @@ const Switch = (
fitToHeight?: boolean;
disabled?: boolean;
tooltip?: string;
labelOnLeading?: boolean;
classNames?: {
container?: string;
thumb?: string;
};
}
) => {
const { label, fitToHeight, classNames, ...primitiveProps } = props;
const { label, fitToHeight, classNames, labelOnLeading, ...primitiveProps } = props;
const id = useId();
const isChecked = props.checked || props.defaultChecked;
return (
@@ -34,6 +35,7 @@ const Switch = (
className={cx(
"flex h-auto w-auto flex-row items-center",
fitToHeight && "h-fit",
labelOnLeading && "flex-row-reverse",
classNames?.container
)}>
<PrimitiveSwitch.Root
@@ -58,7 +60,8 @@ const Switch = (
htmlFor={id}
className={cx(
"text-emphasis ms-2 align-text-top text-sm font-medium",
primitiveProps.disabled ? "cursor-not-allowed opacity-25" : "cursor-pointer "
primitiveProps.disabled ? "cursor-not-allowed opacity-25" : "cursor-pointer",
labelOnLeading && "flex-1"
)}>
{label}
</Label.Root>