LoginSignup
12
3

More than 3 years have passed since last update.

jsxにおけるhover要素の追加

Last updated at Posted at 2019-08-13

https://material-ui.com/components/click-away-listener/
ここのサンプルをもとに、hover要素を追加します

ClickAway.js
const useStyles = makeStyles(theme => ({
  fake: {
    height: theme.spacing(2),
    margin: theme.spacing(1),
    color: 'red',
    '&:hover': {
        backgroundColor: grey[200],
    }  
  },
}));
'&:hover'{
 //something...
}

として追加すれば問題なく動きました!

スクリーンショット 2019-08-13 19.38.39.png

12
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
3