mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-09 06:34:53 +03:00
fix: rtl support icon rotation in sideMenu
This commit is contained in:
parent
991da3a62b
commit
e1fae40e78
|
@ -111,7 +111,6 @@ export const PropertyBullet = styled.span`
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
export const WrappedShelfIcon = styled.i`
|
export const WrappedShelfIcon = styled.i`
|
||||||
transform: ${({ theme }) => (theme.typography.direction === 'rtl') ? 'rotateY(180deg)' : 'none'};
|
|
||||||
display: inline-block
|
display: inline-block
|
||||||
`;
|
`;
|
||||||
export const InnerPropertiesWrap = styled.div`
|
export const InnerPropertiesWrap = styled.div`
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { ShelfIcon } from '../../common-elements/shelfs';
|
||||||
import { IMenuItem, OperationModel } from '../../services';
|
import { IMenuItem, OperationModel } from '../../services';
|
||||||
import { shortenHTTPVerb } from '../../utils/openapi';
|
import { shortenHTTPVerb } from '../../utils/openapi';
|
||||||
import { MenuItems } from './MenuItems';
|
import { MenuItems } from './MenuItems';
|
||||||
import { MenuItemLabel, MenuItemLi, MenuItemTitle, OperationBadge, WrappedShelfIcon } from './styled.elements';
|
import { MenuItemLabel, MenuItemLi, MenuItemTitle, OperationBadge } from './styled.elements';
|
||||||
|
|
||||||
export interface MenuItemProps {
|
export interface MenuItemProps {
|
||||||
item: IMenuItem;
|
item: IMenuItem;
|
||||||
|
@ -58,9 +58,7 @@ export class MenuItem extends React.Component<MenuItemProps> {
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</MenuItemTitle>
|
</MenuItemTitle>
|
||||||
{(item.depth > 0 && item.items.length > 0 && (
|
{(item.depth > 0 && item.items.length > 0 && (
|
||||||
<WrappedShelfIcon>
|
|
||||||
<ShelfIcon float={'right'} direction={item.expanded ? 'down' : 'right'} />
|
<ShelfIcon float={'right'} direction={item.expanded ? 'down' : 'right'} />
|
||||||
</WrappedShelfIcon>
|
|
||||||
)) ||
|
)) ||
|
||||||
null}
|
null}
|
||||||
</MenuItemLabel>
|
</MenuItemLabel>
|
||||||
|
|
|
@ -182,6 +182,3 @@ export const RedocAttribution = styled.div`
|
||||||
}
|
}
|
||||||
`};
|
`};
|
||||||
`;
|
`;
|
||||||
export const WrappedShelfIcon = styled.i`
|
|
||||||
transform: ${({ theme }) => (theme.typography.direction === 'rtl') ? 'rotateY(180deg)' : 'none'};
|
|
||||||
`;
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user