mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-19 06:43:16 +08:00
29 lines
725 B
TypeScript
29 lines
725 B
TypeScript
|
import type { MenuToken } from '.';
|
||
|
import type { GenerateStyle } from '../../_util/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;
|