mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
docs: improve Header menu style (#48597)
This commit is contained in:
parent
3e0c7f7323
commit
8812b14e9d
@ -46,7 +46,7 @@ const useStyle = createStyles(({ token }) => {
|
||||
height: 100%;
|
||||
font-size: ${fontSize}px;
|
||||
font-family: Avenir, ${fontFamily}, sans-serif;
|
||||
border: 0;
|
||||
border: 0 !important;
|
||||
|
||||
&${antCls}-menu-horizontal {
|
||||
border-bottom: none;
|
||||
@ -93,25 +93,6 @@ const useStyle = createStyles(({ token }) => {
|
||||
text-align: center;
|
||||
}
|
||||
`,
|
||||
popoverMenuNav: css`
|
||||
${antCls}-menu-item,
|
||||
${antCls}-menu-submenu {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
${antCls}-menu-item-group-title {
|
||||
padding-inline-start: ${token.paddingLG}px;
|
||||
}
|
||||
|
||||
${antCls}-menu-item-group-list {
|
||||
padding: 0 ${token.paddingLG}px;
|
||||
}
|
||||
|
||||
${antCls}-menu-item,
|
||||
a {
|
||||
color: #333;
|
||||
}
|
||||
`,
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -51,6 +51,7 @@ const useStyle = createStyles(({ token, css }) => {
|
||||
|
||||
@media only screen and (max-width: ${token.mobileMaxWidth}px) {
|
||||
text-align: center;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.nav-search-wrapper {
|
||||
@ -175,9 +176,6 @@ const Header: React.FC = () => {
|
||||
const onWindowResize = useCallback(() => {
|
||||
setHeaderState((prev) => ({ ...prev, windowWidth: window.innerWidth }));
|
||||
}, []);
|
||||
const handleShowMenu = useCallback(() => {
|
||||
setHeaderState((prev) => ({ ...prev, menuVisible: true }));
|
||||
}, []);
|
||||
const onMenuVisibleChange = useCallback((visible: boolean) => {
|
||||
setHeaderState((prev) => ({ ...prev, menuVisible: visible }));
|
||||
}, []);
|
||||
@ -362,7 +360,7 @@ const Header: React.FC = () => {
|
||||
arrow={{ pointAtCenter: true }}
|
||||
onOpenChange={onMenuVisibleChange}
|
||||
>
|
||||
<MenuOutlined className="nav-phone-icon" onClick={handleShowMenu} />
|
||||
<MenuOutlined className="nav-phone-icon" />
|
||||
</Popover>
|
||||
)}
|
||||
{isZhCN && bannerVisible && (
|
||||
|
Loading…
Reference in New Issue
Block a user