From 8eb4545de1cdf012d29b5fc92d8a3b9140c7e7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=9F=E8=B4=A4?= Date: Thu, 13 Oct 2022 18:46:32 +0800 Subject: [PATCH] fix(layout): support hover token --- packages/layout/src/ProLayout.tsx | 1 + .../layout/src/components/PageContainer/index.tsx | 2 ++ packages/layout/src/style/index.ts | 11 ++++++----- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/layout/src/ProLayout.tsx b/packages/layout/src/ProLayout.tsx index 599fec6cba58..5809e4b467f9 100644 --- a/packages/layout/src/ProLayout.tsx +++ b/packages/layout/src/ProLayout.tsx @@ -668,6 +668,7 @@ const BaseProLayout: React.FC = (props) => { = (props) => { children, basePageContainer, hashId, + propsToken?.paddingBlockPageContainerContent, + propsToken?.paddingInlinePageContainerContent, value.hasFooterToolbar, pageContainer.paddingBlockPageContainerContent, ]); diff --git a/packages/layout/src/style/index.ts b/packages/layout/src/style/index.ts index d4b85578a2bd..5d6f6f98ce5e 100644 --- a/packages/layout/src/style/index.ts +++ b/packages/layout/src/style/index.ts @@ -61,6 +61,7 @@ const compatibleStyle: GenerateStyle = (toke ${token.antCls}-menu-submenu-active, ${token.antCls}-menu-submenu-title:hover`]: { color: token.sider.colorTextMenuActive, + backgroundColor: token.sider.colorBgMenuItemHover, borderRadius: token.radiusBase, [`${token.antCls}-menu-submenu-arrow`]: { color: token.sider.colorTextMenuActive, @@ -77,6 +78,7 @@ const compatibleStyle: GenerateStyle = (toke ${token.antCls}-menu-submenu-title:hover`]: { color: token.sider.colorTextMenuActive, borderRadius: token.radiusBase, + backgroundColor: token.sider.colorBgMenuItemHover, [`${token.antCls}-menu-submenu-arrow`]: { color: token.sider.colorTextMenuActive, }, @@ -112,6 +114,7 @@ const compatibleStyle: GenerateStyle = (toke ${token.antCls}-menu-submenu-active`]: { borderRadius: 4, color: token.header.colorTextMenuActive, + backgroundColor: token.header.colorBgMenuItemHover, }, [`${token.antCls}-menu-item-open, @@ -149,15 +152,16 @@ const compatibleStyle: GenerateStyle = (toke ${token.antCls}-menu-submenu-title:hover`]: { color: token.header.colorTextMenuActive, borderRadius: token.radiusBase, + backgroundColor: token.header.colorBgMenuItemSelected, [`${token.antCls}-menu-submenu-arrow`]: { color: token.header.colorTextMenuActive, }, }, [`${token.antCls}-menu-item-selected`]: { - color: token.header.colorTextMenuActive, - fontWeight: 'bold', + color: token.header.colorTextMenuSelected, borderRadius: token.radiusBase, + backgroundColor: token.header.colorBgMenuItemSelected, }, }, }, @@ -179,18 +183,15 @@ const compatibleStyle: GenerateStyle = (toke }, [`${token.antCls}-menu-item-selected`]: { color: token.sider.colorTextMenuSelected, - fontWeight: 'bold', }, [`${token.antCls}-menu-submenu-selected`]: { color: token.sider.colorTextMenuSelected, - fontWeight: 'bold', }, [`${token.antCls}-menu:not(${token.antCls}-menu-horizontal)`]: { [`${token.antCls}-menu-item-selected`]: { backgroundColor: 'rgba(0, 0, 0, 0.04)', borderRadius: token.radiusBase, color: token.sider.colorTextMenuSelected, - fontWeight: 'bold', }, [`${token.antCls}-menu-item:hover, ${token.antCls}-menu-item-active,