Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Material ui 如何在单击物料界面中的表头标签时添加连锁反应';表端口标签';类似于材质UI选项卡_Material Ui - Fatal编程技术网

Material ui 如何在单击物料界面中的表头标签时添加连锁反应';表端口标签';类似于材质UI选项卡

Material ui 如何在单击物料界面中的表头标签时添加连锁反应';表端口标签';类似于材质UI选项卡,material-ui,Material Ui,我试图在Material UI中使用withStyles自定义TablePortLabel。我不明白当我们像点击标签或按钮一样点击它时,如何增加连锁反应。谁能帮我一下吗?提前谢谢 沙盒链接: 代码: const CustomSortLabel = withStyles((theme: Theme) => ({ root: { // flexDirection: 'row-reverse', "&:focus": { "& $

我试图在Material UI中使用withStyles自定义TablePortLabel。我不明白当我们像点击标签或按钮一样点击它时,如何增加连锁反应。谁能帮我一下吗?提前谢谢

沙盒链接:

代码:

const CustomSortLabel = withStyles((theme: Theme) => ({
root: {
  // flexDirection: 'row-reverse',
  "&:focus": {
      "& $icon": {
        opacity: 0.5,
      }
    },
    '&$active': {
    
      '&& $icon': {
        opacity: 1,
      color:'#828190',
      width:'16px',
      height:'16px',
      top:'4px',
      left:'4px',
      transition: 'background 400ms',
      },
    },
    
  },
  icon: {

  "&:focus": {
    opacity: 0.5,
  },
 },

 active: {
  '&$active': {
      // backgroundColor: 'red',
      // color:'red',
      // && instead of & is a workaround for https://github.com/cssinjs/jss/issues/1045
      '&& $icon': {
        opacity: 1,
        color:'#828190',
      
      },
    },
},


}))(TableSortLabel);