Material-UI buttons are very similar to HTML button elements. The difference is that they're React components that work well with other aspects of Material-UI such as theming and layout. Let's take a look at an example that renders different styles of buttons:
import "typeface-roboto";
import React, { useState } from "react";
import Button from "@material-ui/core/Button";
import Grid from "@material-ui/core/Grid";
import IconButton from "@material-ui/core/IconButton";
import AndroidIcon from "@material-ui/icons/Android";
const buttonStyle = { margin: 10 };
function toggleColor(setter, value) {
setter(value === "default" ? "primary" : "default");
}
export default function App() {
const [contained, setContained] = useState("default");
const [text, setText] = useState("default");
const [outlined, setOutlined] = useState("default");
const [icon...