I would like to change the background color of a T...
# javascript
d
I would like to change the background color of a TR element onMouseOver
Copy code
tr {
	attrs {
            onMouseOver = { HOW DO I CHANGE BG COLOR? }
	}
}
I guess I need to use the
onMouseOver
attribute. But how do I change the background color programmatically?
b
It is sort of React question. Could you please move it there (there is a channel for react). The answer for your question is to use react Refs (check react docs for more info)
d
Actually I was able to solve it like this:
Copy code
styledTr.css {
        hover {
            backgroundColor = Color.yellow
        }
}
👍 1