mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-08 14:14:56 +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`
|
||||
transform: ${({ theme }) => (theme.typography.direction === 'rtl') ? 'rotateY(180deg)' : 'none'};
|
||||
display: inline-block
|
||||
`;
|
||||
export const InnerPropertiesWrap = styled.div`
|
||||
|
|
|
@ -5,7 +5,7 @@ import { ShelfIcon } from '../../common-elements/shelfs';
|
|||
import { IMenuItem, OperationModel } from '../../services';
|
||||
import { shortenHTTPVerb } from '../../utils/openapi';
|
||||
import { MenuItems } from './MenuItems';
|
||||
import { MenuItemLabel, MenuItemLi, MenuItemTitle, OperationBadge, WrappedShelfIcon } from './styled.elements';
|
||||
import { MenuItemLabel, MenuItemLi, MenuItemTitle, OperationBadge } from './styled.elements';
|
||||
|
||||
export interface MenuItemProps {
|
||||
item: IMenuItem;
|
||||
|
@ -58,9 +58,7 @@ export class MenuItem extends React.Component<MenuItemProps> {
|
|||
{this.props.children}
|
||||
</MenuItemTitle>
|
||||
{(item.depth > 0 && item.items.length > 0 && (
|
||||
<WrappedShelfIcon>
|
||||
<ShelfIcon float={'right'} direction={item.expanded ? 'down' : 'right'} />
|
||||
</WrappedShelfIcon>
|
||||
)) ||
|
||||
null}
|
||||
</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