Browse Source

fix: Menu SubMenu background in dark theme (#25205)

close #25202
pull/25210/head
偏右 4 years ago
committed by GitHub
parent
commit
87d32a7a3d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      components/menu/__tests__/__snapshots__/demo.test.js.snap
  2. 7
      components/menu/demo/horizontal.md
  3. 4
      components/menu/demo/theme.md
  4. 1
      components/menu/style/dark.less

2
components/menu/__tests__/__snapshots__/demo.test.js.snap

@ -1156,7 +1156,7 @@ Array [
Option 3
</li>
<li
class="ant-menu-item ant-menu-item-danger ant-menu-item-only-child"
class="ant-menu-item ant-menu-item-only-child"
role="menuitem"
style="padding-left:48px"
>

7
components/menu/demo/horizontal.md

@ -26,14 +26,13 @@ class App extends React.Component {
handleClick = e => {
console.log('click ', e);
this.setState({
current: e.key,
});
this.setState({ current: e.key });
};
render() {
const { current } = this.state;
return (
<Menu onClick={this.handleClick} selectedKeys={[this.state.current]} mode="horizontal">
<Menu onClick={this.handleClick} selectedKeys={[current]} mode="horizontal">
<Menu.Item key="mail" icon={<MailOutlined />}>
Navigation One
</Menu.Item>

4
components/menu/demo/theme.md

@ -61,9 +61,7 @@ class Sider extends React.Component {
<Menu.Item key="1">Option 1</Menu.Item>
<Menu.Item key="2">Option 2</Menu.Item>
<Menu.Item key="3">Option 3</Menu.Item>
<Menu.Item key="4" danger>
Option 4
</Menu.Item>
<Menu.Item key="4">Option 4</Menu.Item>
</SubMenu>
<SubMenu key="sub2" icon={<AppstoreOutlined />} title="Navigation Two">
<Menu.Item key="5">Option 5</Menu.Item>

1
components/menu/style/dark.less

@ -1,6 +1,7 @@
.@{menu-prefix-cls} {
// dark theme
&&-dark,
&-dark &-sub,
&&-dark &-sub {
color: @menu-dark-color;
background: @menu-dark-bg;

Loading…
Cancel
Save