0
const customPanelStyle = {
   'background-color': 'red', 
   'border': '1px solid green',
    ':hover'{
        'background': 'blue'    
    }
}
class some extends React.Component{
render(){
return(
   <Panel header={value} key="1" style={customPanelStyle} >
     <p>{this.state.content[key]}</p>
   </Panel>
)
}

} 

How can use o attribute hover in this case? My exemple doesn't work.. what i have to do?

1

1 Answer 1

1

You need the Radium library

import Radium from 'radium';
 some = Radium(some);
    const customPanelStyle = {
       'background-color': 'red', 
       'border': '1px solid green',
        ':hover':{
            'background': 'blue'    
        }
    }

more info about radium

Sign up to request clarification or add additional context in comments.

2 Comments

it doesn't work too... gets red in '{', saying it expects a ':', but even putting ':' does not work... <Panel is an object from ant.design... import { Collapse} from 'antd' and const Panel = Collapse.Panel
updated my answer

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.