Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

42 Zeilen
962 B

  1. import React from "react";
  2. // nodejs library to set properties for components
  3. import PropTypes from "prop-types";
  4. // @material-ui/core components
  5. import { makeStyles } from "@material-ui/core/styles";
  6. import LinearProgress from "@material-ui/core/LinearProgress";
  7. // core components
  8. import styles from "assets/jss/nextjs-material-kit/components/customLinearProgressStyle.js";
  9. const useStyles = makeStyles(styles);
  10. export default function CustomLinearProgress(props) {
  11. const classes = useStyles();
  12. const { color, ...rest } = props;
  13. return (
  14. <LinearProgress
  15. {...rest}
  16. classes={{
  17. root: classes.root + " " + classes[color + "Background"],
  18. bar: classes.bar + " " + classes[color]
  19. }}
  20. />
  21. );
  22. }
  23. CustomLinearProgress.defaultProps = {
  24. color: "gray"
  25. };
  26. CustomLinearProgress.propTypes = {
  27. color: PropTypes.oneOf([
  28. "primary",
  29. "warning",
  30. "danger",
  31. "success",
  32. "info",
  33. "rose",
  34. "gray"
  35. ])
  36. };