'reactjs, antd - how to change 'subMenu' title's style( - backgroundColor)?
I am using Menu component, (https://ant.design/components/menu/#Menu) and within in SubMenu component.
and the code is something like -
<Menu mode="inline" openKeys={["0", "1", "2"]} expandIcon={<></>}>
{array.map((item, index) => (
<SubMenu
key={index}
title={"temp title"}
mode="vertical"
>
<Menu.Item key={`index${index}`}>
"first menu item"
</Menu.Item>
</SubMenu>
}
I want to change the title's style of the SubMenu so that it's background color will be blue. I've tried using
tabStyleActive or tabStyle but nothing worked.
also I couldn't find anything in the documentation.
I'd appreciate any help!
Solution 1:[1]
Try this.
.ant-menu-inline > .ant-menu-submenu > .ant-menu-submenu-title {
color: blue;}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | saurav |
