mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
feat: Menu add token subMenuItemSelectedColor
(#52182)
Some checks are pending
Publish Any Commit / build (push) Waiting to run
🔀 Sync mirror to Gitee / mirror (push) Waiting to run
✅ test / lint (push) Waiting to run
✅ test / test-react-legacy (16, 1/2) (push) Waiting to run
✅ test / test-react-legacy (16, 2/2) (push) Waiting to run
✅ test / test-react-legacy (17, 1/2) (push) Waiting to run
✅ test / test-react-legacy (17, 2/2) (push) Waiting to run
✅ test / test-node (push) Waiting to run
✅ test / test-react-latest (dom, 1/2) (push) Waiting to run
✅ test / test-react-latest (dom, 2/2) (push) Waiting to run
✅ test / test-react-latest-dist (dist, 1/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist, 2/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist-min, 1/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist-min, 2/2) (push) Blocked by required conditions
✅ test / test-coverage (push) Blocked by required conditions
✅ test / build (push) Waiting to run
✅ test / test lib/es module (es, 1/2) (push) Waiting to run
✅ test / test lib/es module (es, 2/2) (push) Waiting to run
✅ test / test lib/es module (lib, 1/2) (push) Waiting to run
✅ test / test lib/es module (lib, 2/2) (push) Waiting to run
👁️ Visual Regression Persist Start / test image (push) Waiting to run
Some checks are pending
Publish Any Commit / build (push) Waiting to run
🔀 Sync mirror to Gitee / mirror (push) Waiting to run
✅ test / lint (push) Waiting to run
✅ test / test-react-legacy (16, 1/2) (push) Waiting to run
✅ test / test-react-legacy (16, 2/2) (push) Waiting to run
✅ test / test-react-legacy (17, 1/2) (push) Waiting to run
✅ test / test-react-legacy (17, 2/2) (push) Waiting to run
✅ test / test-node (push) Waiting to run
✅ test / test-react-latest (dom, 1/2) (push) Waiting to run
✅ test / test-react-latest (dom, 2/2) (push) Waiting to run
✅ test / test-react-latest-dist (dist, 1/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist, 2/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist-min, 1/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist-min, 2/2) (push) Blocked by required conditions
✅ test / test-coverage (push) Blocked by required conditions
✅ test / build (push) Waiting to run
✅ test / test lib/es module (es, 1/2) (push) Waiting to run
✅ test / test lib/es module (es, 2/2) (push) Waiting to run
✅ test / test lib/es module (lib, 1/2) (push) Waiting to run
✅ test / test lib/es module (lib, 2/2) (push) Waiting to run
👁️ Visual Regression Persist Start / test image (push) Waiting to run
- close https://github.com/ant-design/ant-design/issues/45488 - close https://github.com/ant-design/ant-design/issues/46354 - close https://github.com/ant-design/ant-design/issues/52166
This commit is contained in:
parent
650d2dab60
commit
ab3b6ab6e4
@ -95,6 +95,11 @@ export interface ComponentToken {
|
||||
* @descEN Color of selected menu item text
|
||||
*/
|
||||
itemSelectedColor: string;
|
||||
/**
|
||||
* @desc 子菜单内有选中项时,子菜单标题色
|
||||
* @descEN Color of submenu title when submenu has selected item
|
||||
*/
|
||||
subMenuItemSelectedColor: string;
|
||||
|
||||
/** @deprecated Use `horizontalItemSelectedColor` instead */
|
||||
colorItemTextSelectedHorizontal: string;
|
||||
@ -890,6 +895,7 @@ export const prepareComponentToken: GetDefaultToken<'Menu'> = (token) => {
|
||||
groupTitleColor: colorTextDescription,
|
||||
colorItemTextSelected: colorPrimary,
|
||||
itemSelectedColor: colorPrimary,
|
||||
subMenuItemSelectedColor: colorPrimary,
|
||||
colorItemTextSelectedHorizontal: colorPrimary,
|
||||
horizontalItemSelectedColor: colorPrimary,
|
||||
colorItemBg: colorBgContainer,
|
||||
|
@ -13,6 +13,7 @@ const getThemeStyle = (token: MenuToken, themeSuffix: string): CSSInterpolation
|
||||
componentCls,
|
||||
itemColor,
|
||||
itemSelectedColor,
|
||||
subMenuItemSelectedColor,
|
||||
groupTitleColor,
|
||||
itemBg,
|
||||
subMenuItemBg,
|
||||
@ -67,10 +68,8 @@ const getThemeStyle = (token: MenuToken, themeSuffix: string): CSSInterpolation
|
||||
},
|
||||
},
|
||||
|
||||
[`${componentCls}-submenu-selected`]: {
|
||||
[`> ${componentCls}-submenu-title`]: {
|
||||
color: itemSelectedColor,
|
||||
},
|
||||
[`${componentCls}-submenu-selected > ${componentCls}-submenu-title`]: {
|
||||
color: subMenuItemSelectedColor,
|
||||
},
|
||||
|
||||
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
|
||||
|
Loading…
Reference in New Issue
Block a user