ant-design/components/menu/style/rtl.tsx
二货机器人 47d73d8e33
Refactor: Menu full token (#35650)
* chore: more style

* chore: more style

* chore: more and more

* chore: more and more

* chore: all about it

* chore: more style

* chore: more & more

* chore: more

* chore: hover style

* chore: theme of it

* move

* chore: status color

* chore: full token

* chore: update

* chore: update

* chore: force cache update

* chore: force cache back

* fix: commented
2022-05-23 10:58:30 +08:00

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;