Legacy-theme-materialUI-react

    0

    0

    alecoosta

    The first line imports the ThemeProvider utility from the @mui/material/styles package and stores it in the otherTheme variable. The second line uses the createTheme function to create a new ThemeProvider object, which sets the palette to include the main color green at a value of 200.

    Library: react

    import { createTheme, ThemeProvider } from '@mui/material/styles';
    
    const otherTheme = createTheme({
      palette: {
        primary: {
          main: green[200],
        },
      },
    });
    
    function App() {
        return (
            <ThemeProvider theme={otherTheme}>
                <Navbar />
            </ThemeProvider>
        );
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.