I'm trying to implement a MaterialUI theme throughout my app. So far I have this and everything but the transition property is working correctly. Chrome DevTools show the property active but there is no background transition on hover. Clearly I'm not looking in the right places as I can't find this topic discussed anywhere.
import { createMuiTheme } from '@material-ui/core/styles';
import blueGrey from '@material-ui/core/colors/blueGrey';
const primaryStop0 = blueGrey[500]
const primaryStop1 = blueGrey[900]
export const theme = createMuiTheme({
overrides: {
MuiButton: {
root: {
fontWeight: 'bold',
margin: '50px'
},
containedPrimary: {
background: `linear-gradient(to right,${primaryStop0},${primaryStop1})`,
transition: 'background 0.2s ease',
'&:hover': {
background: `linear-gradient(to left,${primaryStop0},${primaryStop1})`
}
}
}
}
})