import * as React from 'react'; import { CssVarsProvider } from '@mui/material/styles'; import Box from '@mui/material/Box'; import Alert from '@mui/material/Alert'; import Button from '@mui/material/Button'; import Grid from '@mui/material/Grid'; import Stack from '@mui/material/Stack'; import Paper from '@mui/material/Paper'; import Table from '@mui/material/Table'; import TableBody from '@mui/material/TableBody'; import TableCell from '@mui/material/TableCell'; import TableContainer from '@mui/material/TableContainer'; import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; import TextField from '@mui/material/TextField'; import Typography from '@mui/material/Typography'; import Tooltip from '@mui/material/Tooltip'; import InputRounded from '@mui/icons-material/InputRounded'; import SmartButtonRounded from '@mui/icons-material/SmartButtonRounded'; import TableViewRounded from '@mui/icons-material/TableViewRounded'; import WarningRounded from '@mui/icons-material/WarningRounded'; import ShoppingCartRounded from '@mui/icons-material/ShoppingCartRounded'; import InfoRounded from '@mui/icons-material/InfoRounded'; import Section from 'docs/src/layouts/Section'; import SectionHeadline from 'docs/src/components/typography/SectionHeadline'; import GradientText from 'docs/src/components/typography/GradientText'; import Item, { Group } from 'docs/src/components/action/Item'; import Highlighter from 'docs/src/components/action/Highlighter'; import More from 'docs/src/components/action/More'; import Frame from 'docs/src/components/action/Frame'; import { ShowcaseCodeWrapper } from 'docs/src/components/home/ShowcaseContainer'; import { customTheme } from 'docs/src/components/home/MaterialDesignComponents'; import { HighlightedCode } from '@mui/docs/HighlightedCode'; import MaterialVsCustomToggle from 'docs/src/components/action/MaterialVsCustomToggle'; import ROUTES from 'docs/src/route'; const DEMOS = ['Button', 'Text Field', 'Table', 'Alert', 'Tooltip'] as const; const CODES = { Button: ` `, 'Text Field': ` `, Table: ` Dessert Calories Frozen yoghurt 109 Cupcake 305
`, Alert: ` This is an alert! This is an alert! This is an alert! `, Tooltip: ` Top Right Left Bottom `, }; export default function MaterialComponents() { const [demo, setDemo] = React.useState<(typeof DEMOS)[number]>(DEMOS[0]); const [customized, setCustomized] = React.useState(false); const icons = { [DEMOS[0]]: , [DEMOS[1]]: , [DEMOS[2]]: , [DEMOS[3]]: , [DEMOS[4]]: , }; return (
40+ building block components } description="A meticulous implementation of Material Design; every Material UI component meets the highest standards of form and function." /> {DEMOS.map((name) => ( setDemo(name)}> ))} {demo === 'Button' && ( )} {demo === 'Text Field' && ( )} {demo === 'Table' && ( .MuiTableRow-root:last-of-type > .MuiTableCell-root': { borderBottomWidth: 0, }, }} > Dessert Calories Frozen yoghurt 109 Cupcake 305
)} {demo === 'Alert' && ( This is an alert! This is an alert! This is an alert! )} {demo === 'Tooltip' && ( Top *': { display: 'inline-block' } }}> Left Right Bottom )}
); }