cfnz
01/21/2021, 2:09 AMconst StyledRating = withStyles({
iconFilled: {
color: '#ff6d75',
},
iconHover: {
color: '#ff3d47',
},
})(Rating);
export default function CustomizedRatings() {
return (
<div>
...
<StyledRating
name="customized-color"
defaultValue={2}
getLabelText={(value: number) => `${value} Heart${value !== 1 ? 's' : ''}`}
precision={0.5}
icon={<FavoriteIcon fontSize="inherit" />}
/>
...
How would I use/pass these StyledRatings styles to my component?
Kotlin - how do I add the iconFilled prop or style?:
...
mRating("customized-empty", value, precision = 0.5, onChange = { _, newValue -> valueCustom = newValue },
icon = mIcon("favorite", fontSize = MIconFontSize.inherit, addAsChild = false, color = MIconColor.inherit) {
css {
???
}
}
)
cfnz
02/01/2021, 8:47 PMcfnz
02/01/2021, 8:48 PMmRating("customized-empty", value, precision = 0.5, onChange = { _, newValue -> value = newValue },
icon = mIcon("favorite", fontSize = MIconFontSize.inherit, addAsChild = false)) {
css {
".MuiRating-iconFilled" {
color = Color("#ff6d75")
}
".MuiRating-iconHover" {
color = Color("#ff3d47")
}
}
Big Chungus
02/04/2021, 8:16 AMcfnz
02/04/2021, 7:33 PMBig Chungus
02/04/2021, 7:37 PMBig Chungus
02/04/2021, 7:39 PMBig Chungus
02/04/2021, 7:39 PMcfnz
02/04/2021, 8:15 PMBig Chungus
02/04/2021, 9:51 PM