@material-ui/core#createTheme TypeScript Examples

The following examples show how to use @material-ui/core#createTheme. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ApiBar.tsx    From backstage with Apache License 2.0 6 votes vote down vote up
textFieldTheme = createTheme({
  palette: {
    type: 'dark',
    primary: {
      light: '#fff',
      main: '#fff',
      dark: '#fff',
      contrastText: '#fff',
    },
    secondary: {
      light: '#fff',
      main: '#fff',
      dark: '#fff',
      contrastText: '#fff',
    },
    action: {
      disabled: '#fff',
    },
    text: {
      primary: '#fff',
      secondary: '#fff',
    },
  },
})
Example #2
Source File: useTheme.tsx    From shadowsocks-electron with GNU General Public License v3.0 6 votes vote down vote up
themes = {
  light: createTheme({
    spacing: 8,
    palette: {
      primary: {
        main: indigo[500],
        light: indigo[400],
      },
      secondary: {
        main: grey[300]
      },
      background: {
        paper: "#fff",
        default: "#fafafa"
      },
    }
  }),
  dark: createTheme({
    spacing: 8,
    palette: {
      type: "dark",
      primary: {
        main: indigo[300],
        light: indigo[300],
      },
      secondary: {
        main: grey[800],
        dark: grey[900]
      },
      background: {
        default: '#424242',
        paper: grey[900],
      },
    }
  })
}
Example #3
Source File: index.ts    From knests with MIT License 6 votes vote down vote up
theme = createTheme({
  palette,
  typography,
  overrides,
  zIndex: {
    appBar: 1200,
    drawer: 1100,
  },
})
Example #4
Source File: App.tsx    From UsTaxes with GNU Affero General Public License v3.0 6 votes vote down vote up
App = (): ReactElement => {
  const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)')

  const theme = useMemo(
    () =>
      createTheme({
        palette: {
          secondary: prefersDarkMode
            ? {
                light: '#4f5b62',
                main: '#d5d5d5',
                dark: '#000a12',
                contrastText: '#ffffff'
              }
            : {
                light: '#4f5b62',
                main: '#263238',
                dark: '#000a12',
                contrastText: '#ffffff'
              },
          primary: {
            light: '#66ffa6',
            main: '#00e676',
            dark: '#00b248',
            contrastText: '#000000'
          }
        }
      }),
    [prefersDarkMode]
  )

  return (
    <div className="App">
      <ThemeProvider theme={theme}>
        <Main />
      </ThemeProvider>
    </div>
  )
}
Example #5
Source File: theme.tsx    From projectboard with MIT License 6 votes vote down vote up
theme = createTheme({
  palette: {
    primary: {
      main: '#4338CA',
      contrastText: '#ffffff',
    },
  },
  typography: {
    fontFamily: 'Inter UI',
  },
})
Example #6
Source File: theme.ts    From interface-v2 with GNU General Public License v3.0 5 votes vote down vote up
function createQuickTheme(
  custom: any,
  options?: ThemeOptions | undefined,
  ...args: any[]
) {
  return createTheme(merge(custom, options), ...args);
}
Example #7
Source File: theme.tsx    From BlinkWebUI with GNU General Public License v3.0 5 votes vote down vote up
theme = createTheme({
    palette: {
        primary: blue,
        secondary: pink
    }
})
Example #8
Source File: theme.ts    From dashboard with Apache License 2.0 5 votes vote down vote up
theme = createTheme({
  palette: {
    primary: {
      main: PERSIAN_GREEN,
      light: "#4db6ac",
    },
    secondary: {
      light: HONEYBEE,
      main: GOLDEN_TANOI,
    },
    background: {
      default: WHITE,
      paper: PAPER_BACKGROUND,
    },
    action: {
      disabledBackground: DISABLED_GREY_BACKGROUND,
      disabled: DISABLED_GREY_TEXT,
    },
    text: {
      primary: BLACK,
      secondary: BLACK_WITH_TRANSPARENCY,
    },
    error: {
      main: BITTER_SWEET,
    },
    warning: {
      main: GOLDEN_TANOI,
      dark: SUDOBANGBANG,
    },
    success: {
      main: SCOOTER_GREEN,
    },
    info: {
      main: PERSIAN_GREEN,
      dark: SKY_DIVING_IN_THE_BLUE,
    },
    grey: {
      100: IVORY_EGG,
      200: CODE_BACKGROUND,
      300: NOT_SNOW_WHITE_GRAY,
      400: DADGREY,
      600: QUICK_SILVER,
      700: DEBUG_GREY,
    },
    filters: [
      {
        main: CANCRO,
        contrastText: ARIEL_SCALE,
      },
      {
        main: SKY_CLOUD,
        contrastText: SEAWATER_POPSICLE,
      },
      {
        main: CANCRO,
        contrastText: ARIEL_SCALE,
      },
      {
        main: BANANA_YOGURT_SWIRL,
        contrastText: HOODIE_MASCOT,
      },
    ],
  },
})
Example #9
Source File: App.tsx    From metaplex with Apache License 2.0 5 votes vote down vote up
theme = createTheme({
  palette: {
    type: 'dark',
  },
})