File tree 3 files changed +7
-2
lines changed
3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export type CalProviderProps = {
67
67
children ?: ReactNode ;
68
68
clientId : string ;
69
69
accessToken ?: string ;
70
- options : { refreshUrl ?: string ; apiUrl : string } ;
70
+ options : { refreshUrl ?: string ; apiUrl : string ; readingDirection ?: "ltr" | "rtl" } ;
71
71
autoUpdateTimezone ?: boolean ;
72
72
onTimezoneChange ?: ( ) => void ;
73
73
version ?: API_VERSIONS_ENUM ;
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import type http from "../lib/http";
8
8
export interface IAtomsContextOptions {
9
9
refreshUrl ?: string ;
10
10
apiUrl : string ;
11
+ readingDirection ?: "ltr" | "rtl" ;
11
12
}
12
13
13
14
export interface IAtomsContext {
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import type { ReactNode } from "react";
2
2
3
3
import { classNames } from "@calcom/lib" ;
4
4
5
+ import { useAtomsContext } from "../../hooks/useAtomsContext" ;
5
6
import { CALCOM_ATOMS_WRAPPER_CLASS } from "../constants/styles" ;
6
7
7
8
export const AtomsWrapper = ( {
@@ -11,8 +12,11 @@ export const AtomsWrapper = ({
11
12
children : ReactNode ;
12
13
customClassName ?: string ;
13
14
} ) => {
15
+ const { options } = useAtomsContext ( ) ;
14
16
return (
15
- < div className = { classNames ( `${ CALCOM_ATOMS_WRAPPER_CLASS } m-0 w-auto p-0` , customClassName ) } >
17
+ < div
18
+ dir = { options ?. readingDirection ?? "ltr" }
19
+ className = { classNames ( `${ CALCOM_ATOMS_WRAPPER_CLASS } m-0 w-auto p-0` , customClassName ) } >
16
20
{ children }
17
21
</ div >
18
22
) ;
You can’t perform that action at this time.
0 commit comments