Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 810 Bytes

material-ui-code-snippets.md

File metadata and controls

31 lines (24 loc) · 810 Bytes

Material UI code snippets

Set Typography Text Color in Material UI

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: "black" }}>
      <WhiteTextTypography variant="h3">
        This text should be white
      </WhiteTextTypography>
    </div>
  );
}

https://stackoverflow.com/a/60609045

Global snackbars in React with Redux

https://browntreelabs.com/snackbars-in-react-redux-and-material-ui/