You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
728 B
29 lines
728 B
1 year ago
|
import type { MenuToken } from '.';
|
||
|
import type { GenerateStyle } from '../../theme/internal';
|
||
|
|
||
|
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;
|