temp.txt 735 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { useState } from "react";
  2. import "@fontsource/roboto";
  3. import {
  4. Card,
  5. CardHeader,
  6. Switch,
  7. CardContent,
  8. Box,
  9. Container,
  10. Typography,
  11. FormGroup,
  12. FormControlLabel,
  13. CssBaseline,
  14. } from "@mui/material";
  15. import { createTheme, ThemeProvider } from "@mui/material/styles";
  16. <div className="App">
  17. <Box component="div" p={5}></Box>
  18. <Card>
  19. <CardHeader
  20. action={
  21. <FormGroup>
  22. <FormControlLabel
  23. control={
  24. <Switch checked={isDarkTheme} onChange={changeTheme} />
  25. }
  26. />
  27. </FormGroup>
  28. }
  29. />
  30. <CardContent>
  31. <Typography variant="h3" component="h3">
  32. {isDarkTheme? "Dark Theme" : "Light Theme"}
  33. </Typography>
  34. </CardContent>
  35. </Card>
  36. </div>