【发布时间】:2021-03-05 18:03:53
【问题描述】:
我一直在尝试获取芯片的悬停属性。所需的响应应该是,当我将鼠标悬停在芯片阵列中的芯片上时,它应该显示删除图标。
我已附上 sn-p:-
chip: {
"&:hover": {
backgroundColor: darken(
theme.palette.primary.main,
theme.palette.action.hoverOpacity * 3,
),
},
},
<Chip
className={classes.chip}
key={i}
label={tag.label}
size="small"
color={state.edit === false ? "primary"
: tag.to_del ? "secondary"
: tag.is_new ? "primary"
: "default"}
onDelete={state.edit === true ? ((e) => state.deleteTag(i)) : undefined}
// onMouseEnter={}
onMouseDown={(e) => e.preventDefault()}
/>
【问题讨论】:
标签: javascript reactjs material-ui