Lets say i want every Button component from material-ui to have a default props of variant=\"contained\" color=\"secondary\" is it pos
The documentation for this is here: https://material-ui.com/customization/globals/#default-props
Here is an example of how to do this:
import React from "react";
import ReactDOM from "react-dom";
import {createMuiTheme, MuiThemeProvider, Button} from "@material-ui/core";
const theme = createMuiTheme({
props: {
MuiButton: {
variant: "contained",
color: "secondary"
}
}
});
function App() {
return (
);
}
const rootElement = document.getElementById("root");
ReactDOM.render( , rootElement);