score:1
try this
.sidenav---_u0en{
background: yourcolor
}
if it still doesn't work add !important
or
your code doesn't work most likely because you are using background-color
try changing it to background
score:0
the sidenav component allow to use a custom classname, but there is something wrong during the classnames merge.
<sidenav classname="menu" > ... </sidenav>
this code add your class .menu
at the first, so your css styles is crashed bug the sidenav default classes.
the problem is at this line
look at this issue
score:0
<sidenav style={{'background-color': 'red'}}></sidenav>
score:1
i solved this by putting an id
<sidenav
onselect={(selected) => {
// add your code here
}}
ontoggle={ontoggle}
id="sdb"
>
in css:
#sdb{
background-color: #120a8f;
}
Source: stackoverflow.com
Related Query
- Cannot change the background colour of <SideNav>
- Sass: Applying the same rule to two classes to ensure that the background colour of a span element doesn't change
- ReactJS: How to make button background colour change when the text inside it is a certain value
- How to change the background colour of button when clicked
- How can you change the background colour of material-ui/lab/Autocomplete
- I want to change the background colour of columns of ant design table if the index of my data is even
- Is there a way to change the background colour of the view for 1 second whenever the state changes in react native?
- How do I change the background color of the body?
- How can i change the cell colour in ANTD table according to the value?
- Material UI | How to change the font colour of a disabled input text field?
- Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it
- How do I change the background color of a selected react-bootstrap ToggleButton?
- Change the background color of a screen with react native
- Antd - is there anyway to change background color of the Card title?
- Cannot change the width of the react-select element
- cannot change colour of label in <DrawerItem> react-native
- How to make the background image change every X seconds in React?
- How to change the text color and background color of ant-tooltip component
- randomly change the background color of a react app by a click
- How to change the selected table row background color with React
- How to change the selected table row background using Material-UI on React
- In React Is there a way to change the background color of a parent Label tag on a Radio Input checked?
- How to change the background color of an ant.design InputNumber?
- Material-UI | How to change the colour of a disabled textfield?
- Change the background image dynamically
- How to change the background color of a parent component from inside a child component in react, gatsby
- How to change the background color in semantic ui react?
- ReactJS 7 - How to conditionally change the background color of table cell only (not the row) based on its value?
- Is there any way to set a background colour to the full column for Saturday and Sunday in 'React Full Calendar'
- react I want to change the background of globalstyle in chakra theme.ts by props
More Query from same tag
- React Hooks: Adding new fields to an Object state does not get reflected immediately
- toggle active state with hooks react
- How to implement validation/restriction in react-datepicker
- React testing: class component with props with Enzyme
- React tsconfig-paths not find module
- React JS - How can I show 2 dropdowns and show data from static json
- How to make sidenav mobile link in react js about this situation?
- How to pass arguments to function and still access event to prevent default
- How to generate UUIDs in JS or React?
- Using resourceQuery with Webpack v3.8.1
- What is the best way to add a value to an array in state
- ReactJS Ionic cannot remove padding from Grid Col element
- React - Preference: function component vs class component
- Console log statements on React event handler causes synthetic event warnings
- Is there any way to prevent react-select (Select.Async) from deleting the search input value on unfocus?
- Composing an axios url with a value that contains the character & in it
- Switch Statement Causing - React limits the number of renders to prevent an infinite loop
- React Typescript Generic Type Overloading (e.g. useState)
- ./~/chartjs-plugin-zoom/dist/chartjs-plugin-zoom.esm.js Module not found: Can't resolve 'chart.js/helpers'
- How can I insert a basic Search bar in Material UI Data Grid?
- Ant Design - Modal with Datepicker (form)
- React: hiding vs removing components
- How to extend enum for Typescript in React
- How do I map values for custom thumbnails using react-responsive-carousel and react-image-magnifiers?
- Redux initialize data on refresh delay
- Dropdown list of names in ReactJS
- TypeError: Cannot read property 'validateFields' of undefined ReactJS
- Additional Arguments to Styled Components in React with Typescript
- React router not matching base path
- Cannot GET / expo react