材质用户界面中的样式已禁用标签

时间:2019-03-25 07:26:49

标签: material-ui jss

我想为禁用标签设置样式。我应用样式的方式似乎不正确。它有效,但我仍然认为会有更好的方法。

我尝试使用$ruleName,但没有成功。

不适用于$ruleName。我假设会有一个$ruleName,名称为$label

const styles = () => ({
      root: {
        flexGrow: 1,
        overflow: "visible"
      },
      tabsRoot: {
        overflow: "visible",
        "& > div > div": {
          overflow: "visible",
          height: "54px"
        }
      },
      disabled: {
        "&$label": {
          fontSize: theme.fontSize.MEDIUM
        }
      },
      label: {
        fontSize: theme.fontSize.LARGE
      },
      tabsIndicator: {
        backgroundColor: theme.palette.ACTIVE,
        height: 6,
        boxShadow: "0px 3px 7px 0 rgba(0, 199, 178, 0.35)",
        bottom: "-1px"
      },
      tabSelected: {}
    });

工作代码

const styles = () => ({
  root: {
    flexGrow: 1,
    overflow: "visible"
  },
  tabsRoot: {
    overflow: "visible",
    "& > div > div": {
      overflow: "visible",
      height: "54px"
    }
  },
  disabled: {
    "& > span > span > span": {
      fontSize: theme.fontSize.MEDIUM
    }
  },
  label: {
    fontSize: theme.fontSize.LARGE
  },
  tabsIndicator: {
    backgroundColor: theme.palette.ACTIVE,
    height: 6,
    boxShadow: "0px 3px 7px 0 rgba(0, 199, 178, 0.35)",
    bottom: "-1px"
  },
  tabSelected: {}
});

0 个答案:

没有答案
相关问题