ant-design/components/menu/style/rtl.tsx
二货机器人 de2992f96f
chore: move path (#36243)
* chore: base move

* chore: all path

* chore: fix script
2022-06-27 14:25:59 +08:00

29 lines
719 B
TypeScript

import type { MenuToken } from '.';
import type { GenerateStyle } from '../../theme';
const getRTLStyle: GenerateStyle<MenuToken> = ({ componentCls, menuArrowOffset }) => ({
[`${componentCls}-rtl`]: {
direction: 'rtl',
},
[`${componentCls}-submenu-rtl`]: {
transformOrigin: '100% 0',
},
// Vertical Arrow
[`${componentCls}-rtl${componentCls}-vertical,
${componentCls}-submenu-rtl ${componentCls}-vertical`]: {
[`${componentCls}-submenu-arrow`]: {
'&::before': {
transform: `rotate(-45deg) translateY(-${menuArrowOffset})`,
},
'&::after': {
transform: `rotate(45deg) translateY(${menuArrowOffset})`,
},
},
},
});
export default getRTLStyle;