ant-design/components/dropdown/style/status.tsx
MadCcc 5d9cb2e50d
refactor: Optimize theme export and add docs (#38902)
* refactor: Optimize theme export and add docs

* chore: fix lint

* chore: fix lint

* chore: fix lint
2022-11-23 20:22:38 +08:00

26 lines
632 B
TypeScript

import type { DropdownToken } from '.';
import type { GenerateStyle } from '../../theme/internal';
const genStatusStyle: GenerateStyle<DropdownToken> = (token) => {
const { componentCls, menuCls, colorError, colorTextLightSolid } = token;
const itemCls = `${menuCls}-item`;
return {
[`${componentCls}, ${componentCls}-menu-submenu`]: {
[`${menuCls} ${itemCls}`]: {
[`&${itemCls}-danger`]: {
color: colorError,
'&:hover': {
color: colorTextLightSolid,
backgroundColor: colorError,
},
},
},
},
};
};
export default genStatusStyle;