fix: cal atoms schedule container class in availability settings custom class names not being applied (#21733)
* fix: classname not used * fix types * added type
This commit is contained in:
1 parent
c7662cad61
commit
cf83038a7a
3 files changed
+40
-52
No files matched your search
@@ -38,7 +38,7 @@ import { Tooltip } from "@calcom/ui/components/tooltip";
|
||||
import { Shell as PlatformShell } from "../src/components/ui/shell";
|
||||
import { cn } from "../src/lib/utils";
|
||||
import { Timezone as PlatformTimzoneSelect } from "../timezone/index";
|
||||
import type { AvailabilityFormValues } from "./types";
|
||||
import type { AvailabilityFormValues, scheduleClassNames } from "./types";
|
||||
|
||||
export type Schedule = {
|
||||
id: number;
|
||||
@@ -58,13 +58,7 @@ export type CustomClassNames = {
|
||||
formClassName?: string;
|
||||
timezoneSelectClassName?: string;
|
||||
subtitlesClassName?: string;
|
||||
scheduleClassNames?: {
|
||||
scheduleContainer?: string;
|
||||
scheduleDay?: string;
|
||||
dayRanges?: string;
|
||||
timeRanges?: string;
|
||||
labelAndSwitchContainer?: string;
|
||||
};
|
||||
scheduleClassNames?: scheduleClassNames;
|
||||
overridesModalClassNames?: string;
|
||||
hiddenSwitchClassname?: {
|
||||
container?: string;
|
||||
@@ -564,7 +558,11 @@ export function AvailabilitySettings({
|
||||
}}
|
||||
className={cn(customClassNames?.formClassName, "flex flex-col sm:mx-0 xl:flex-row xl:space-x-6")}>
|
||||
<div className="flex-1 flex-row xl:mr-0">
|
||||
<div className="border-subtle mb-6 rounded-md border">
|
||||
<div
|
||||
className={cn(
|
||||
"border-subtle mb-6 rounded-md border",
|
||||
customClassNames?.scheduleClassNames?.scheduleContainer
|
||||
)}>
|
||||
<div>
|
||||
{typeof weekStart === "string" && (
|
||||
<Schedule
|
||||
@@ -573,7 +571,7 @@ export function AvailabilitySettings({
|
||||
copyTime: t("copy_times_to"),
|
||||
deleteTime: t("delete"),
|
||||
}}
|
||||
className={
|
||||
classNames={
|
||||
customClassNames?.scheduleClassNames ? { ...customClassNames.scheduleClassNames } : {}
|
||||
}
|
||||
control={form.control}
|
||||
|
||||
@@ -20,3 +20,12 @@ export type AvailabilityFormValues = {
|
||||
timeZone: string;
|
||||
isDefault: boolean;
|
||||
};
|
||||
|
||||
export type scheduleClassNames = {
|
||||
schedule?: string;
|
||||
scheduleDay?: string;
|
||||
dayRanges?: string;
|
||||
timeRangeField?: string;
|
||||
labelAndSwitchContainer?: string;
|
||||
scheduleContainer?: string;
|
||||
};
|
||||
Reference in new issue
Block a user