javascript - Material UI: How to change font size of label in React Material Ui Stepper? - Stack Overflow

In React material ui, I want to change font size of stepper label. How to acheive that?function getStep

In React material ui, I want to change font size of stepper label. How to acheive that?

  function getSteps() {
    return [
      "OPTION 1",
      "OPTION 2",
      "OPTION 3"
      "OPTION 4"
     
    ];
  }

In React material ui, I want to change font size of stepper label. How to acheive that?

  function getSteps() {
    return [
      "OPTION 1",
      "OPTION 2",
      "OPTION 3"
      "OPTION 4"
     
    ];
  }
Share Improve this question asked Oct 5, 2020 at 7:25 theWanderertheWanderer 6562 gold badges13 silver badges34 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 3

Perhaps you could add a custom css to your webpage :

.MuiStepLabel-labelContainer span {
    font-size: xx-large;
}

You can adjust to your desired font size by changing the "font-size" value.

Target the label CSS rule name in the classes prop

import { makeStyles } from "@material-ui/core";

const useStyles = makeStyles({
  customLabelStyle: {
    fontSize: "24px"
  }
});

function App () {
  const classes = useStyles();

  return (
    <StepLabel classes={{label: classes.customLabelStyle}}>
  );
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745405189a4626281.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信