Language:

Search

How to set Typography Text Color in Material UI

  • Share this:
post-title
import React from "react";
import { withStyles } from "@material-ui/core/styles";
import Typography from "@material-ui/core/Typography";

const WhiteTextTypography = withStyles({
  root: {
    color: "#FFFFFF"
  }
})(Typography);

export default function App() {
  return (
    <div className="App" style={{ backgroundColor: "purple" }}>
      <WhiteTextTypography variant="h1">
               White Text
      </WhiteTextTypography>
    </div>
  );
}
Ammar Javed

Ammar Javed

Still Learning | Still Searching | Still Exploring | The secret of your success is determined by your daily agenda.