fix: rtl support icon rotation in sideMenu

This commit is contained in:
sajjad 2019-08-31 16:39:50 +04:30
parent 991da3a62b
commit e1fae40e78
3 changed files with 1 additions and 7 deletions

View File

@ -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`

View File

@ -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>

View File

@ -182,6 +182,3 @@ export const RedocAttribution = styled.div`
}
`};
`;
export const WrappedShelfIcon = styled.i`
transform: ${({ theme }) => (theme.typography.direction === 'rtl') ? 'rotateY(180deg)' : 'none'};
`;