I start to study material-ui and create a simple app in the SandBox: https://codesandbox.io/s/eager-ride-cmkrc
The style of jss is unusual for me, but if you help me with these two simple exercises, then I will understand everything.
First: I want union common properties of ButtonLeft
and ButtonRight
into new class and extend it: (https://github.com/cssinjs/jss-extend#use-rule-name-from-the-current-styles-object)
ButtonControll: {
display: "none",
position: "absolute",
fontSize: "24px"
},
ButtonLeft: {
extend: 'ButtonControll',
left: "0",
},
ButtonRight: {
extend: 'ButtonControll',
right: "0",
}
But it's doesn't work =(
Second: I want the arrows to appear when you hover over the container, so I wrote this:
"&:hover .MuiIconButton-root": {
display: "block"
}
Problem: MuiIconButton-root
it is base className for all IconButtons? but I want something like this:
"&:hover ButtonLeft": {
display: "block",
backgroundColor: 'red'
},
"&:hover ButtonRight": {
display: "block",
fontSize: '50px'
}
Please, help me with these two simple tasks and then I will understand everything =)