diff --git a/src/components/Redoc/styled.elements.tsx b/src/components/Redoc/styled.elements.tsx index ebb30df1..adb18d16 100644 --- a/src/components/Redoc/styled.elements.tsx +++ b/src/components/Redoc/styled.elements.tsx @@ -10,6 +10,7 @@ export const RedocWrap = styled.div` display: flex; position: relative; text-align: left; + direction: ${theme.typography.direction}; -webkit-font-smoothing: ${theme.typography.smoothing}; font-smoothing: ${theme.typography.smoothing}; @@ -42,7 +43,7 @@ export const BackgroundStub = styled.div` position: absolute; top: 0; bottom: 0; - right: 0; + ${({ theme }) => theme.typography.direction === 'ltr' ? 'right: 0;' : 'left: 0;'}; width: ${({ theme }) => { if (theme.rightPanel.width.endsWith('%')) { const percents = parseInt(theme.rightPanel.width, 10); diff --git a/src/theme.ts b/src/theme.ts index 9b274097..a6dd205b 100644 --- a/src/theme.ts +++ b/src/theme.ts @@ -273,6 +273,8 @@ export interface ResolvedThemeInterface { fontWeightBold: string; fontFamily: string; + direction?: 'ltr' | 'rtl', + smoothing: string; optimizeSpeed: boolean;