我有一个设置按钮,点击它应该显示一个锚定在设置按钮右侧的菜单,如图所示
因为反应材料 menu 会做同样的工作,我使用如下菜单
<StyledMenu
id="customized-menu"
anchorEl={anchorEl}
keepMounted
open={Boolean(anchorEl)}
onClose={handleClose}>
<StyledMenuItem>
<div style={{ width: '70%', fontSize: '14px', padding: '5px' }}>
<div>
<img src={props.icon} alt='' style={{ width: '18px', height: '18px', }}></img>
Brigthness
</div>
<div><Slider value={value ? value : 30} onChange={handleChange} aria-labelledby="continuous-slider" /></div>
</div>
<div style={{ width: '30%', padding: '5px' }}>
<div>Reset</div>
<div><input style={{width:'20px',height:'20px'}} text="om" /></div>
</div>
</StyledMenuItem>
</StyledMenu>
问题