Skip to content

Instantly share code, notes, and snippets.

@skclusive
Created December 7, 2020 12:28
Show Gist options
  • Save skclusive/7256d0689bd1c643e19d143487903c3a to your computer and use it in GitHub Desktop.
Save skclusive/7256d0689bd1c643e19d143487903c3a to your computer and use it in GitHub Desktop.
@namespace Skclusive.Dashboard.App.View
@using Skclusive.Material.Theme
<ThemeProvider
Light="@Light"
Dark="@Dark">
<RouterLayout
Main="@typeof(FullLayout)"
Mini="@typeof(SmallLayout)" />
</ThemeProvider>
@code
{
public static ThemeValue Light = ThemeFactory.CreateTheme(new ThemeConfig
{
Palette = new PaletteConfig
{
Type = PaletteType.Light,
Primary = new PaletteColorConfig
{
Main = PaletteColors.Blue.X700
},
Secondary = new PaletteColorConfig
{
Main = PaletteColors.Pink.A400.Darken(0.1m)
},
Background = new PaletteBackground
{
Default = "#fff",
Custom = new Dictionary<string, string>
{
{ "appbar-color", "var(--theme-palette-primary-contrast-text)" },
{ "appbar-background-color", "var(--theme-palette-primary-main)" },
},
}
}
});
public static ThemeValue Dark = ThemeFactory.CreateTheme(new ThemeConfig
{
Palette = new PaletteConfig
{
Type = PaletteType.Dark,
Primary = new PaletteColorConfig
{
Main = PaletteColors.Blue.X200
},
Secondary = new PaletteColorConfig
{
Main = PaletteColors.Pink.X200
},
Background = new PaletteBackground
{
Default = "#121212",
Custom = new Dictionary<string, string>
{
{ "appbar-color", "#fff" },
{ "appbar-background-color", "#333" },
},
}
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment