Scheduling infrastructure for absolutely everyone.
chore: add default reading direction to atoms wrapper (#17710)
Morgan12e78a735003
diff --git a/packages/platform/atoms/cal-provider/CalProvider.tsx b/packages/platform/atoms/cal-provider/CalProvider.tsxindex 68c1e65f76e..784f03f3730 100644--- a/packages/platform/atoms/cal-provider/CalProvider.tsx+++ b/packages/platform/atoms/cal-provider/CalProvider.tsx@@ -67,7 +67,7 @@ export type CalProviderProps = {children?: ReactNode;clientId: string;accessToken?: string;- options: { refreshUrl?: string; apiUrl: string };+ options: { refreshUrl?: string; apiUrl: string; readingDirection?: "ltr" | "rtl" };autoUpdateTimezone?: boolean;onTimezoneChange?: () => void;version?: API_VERSIONS_ENUM;diff --git a/packages/platform/atoms/hooks/useAtomsContext.ts b/packages/platform/atoms/hooks/useAtomsContext.tsindex 41a03c97a21..7ce60a0dd79 100644--- a/packages/platform/atoms/hooks/useAtomsContext.ts+++ b/packages/platform/atoms/hooks/useAtomsContext.ts@@ -8,6 +8,7 @@ import type http from "../lib/http";export interface IAtomsContextOptions {refreshUrl?: string;apiUrl: string;+ readingDirection?: "ltr" | "rtl";}export interface IAtomsContext {diff --git a/packages/platform/atoms/src/components/atoms-wrapper.tsx b/packages/platform/atoms/src/components/atoms-wrapper.tsxindex 83076b5cbee..70f7fc548dc 100644--- a/packages/platform/atoms/src/components/atoms-wrapper.tsx+++ b/packages/platform/atoms/src/components/atoms-wrapper.tsx@@ -2,6 +2,7 @@ import type { ReactNode } from "react";import { classNames } from "@calcom/lib";+import { useAtomsContext } from "../../hooks/useAtomsContext";import { CALCOM_ATOMS_WRAPPER_CLASS } from "../constants/styles";export const AtomsWrapper = ({@@ -11,8 +12,11 @@ export const AtomsWrapper = ({children: ReactNode;customClassName?: string;}) => {+ const { options } = useAtomsContext();return (- <div className={classNames(`${CALCOM_ATOMS_WRAPPER_CLASS} m-0 w-auto p-0`, customClassName)}>+ <div+ dir={options?.readingDirection ?? "ltr"}+ className={classNames(`${CALCOM_ATOMS_WRAPPER_CLASS} m-0 w-auto p-0`, customClassName)}>{children}</div>);