---
order: 5
title:
zh-CN: 子菜单主题
en-US: Sub-menu theme
---
## zh-CN
内建了两套主题 `light` 和 `dark`,默认 `light`。
## en-US
The Sub-menu will inherit the theme of `Menu`, but you can override this at the `SubMenu` level via the `theme` prop.
```jsx
import { Menu, Switch } from 'antd';
import { MailOutlined } from '@ant-design/icons';
const { SubMenu } = Menu;
const SubMenuTheme = () => {
const [theme, setTheme] = React.useState('light');
const [current, setCurrent] = React.useState('1');
const changeTheme = value => {
setTheme(value ? 'dark' : 'light');
};
const handleClick = e => {
setCurrent(e.key);
};
return (
<>