mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-08 14:14:56 +03:00
feat: add direction to the redoc styled component
this feature let users to set direction and it's officially start point of RTL
This commit is contained in:
parent
1b3e0ced7b
commit
574d4032c1
|
@ -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);
|
||||
|
|
|
@ -273,6 +273,8 @@ export interface ResolvedThemeInterface {
|
|||
fontWeightBold: string;
|
||||
fontFamily: string;
|
||||
|
||||
direction?: 'ltr' | 'rtl',
|
||||
|
||||
smoothing: string;
|
||||
optimizeSpeed: boolean;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user