uilibrary / Octavia-admin-Pro-Issues

Public repository for submitting issues and feature request for Octavia Admin Dashboard Template
7 stars 0 forks source link

How do I set the default theme to dark mode? #29

Open franklin113 opened 2 years ago

franklin113 commented 2 years ago

Hi I have just purchased a license for this and need the default theme be set to "dark". I made adjustments to the themeConfig.js with no luck.

export const themeConfig = {
  disableCustomizer: true, // options[Boolean] : true, false(default)

  rtl: false, // options[Boolean] : true, false(default)
  verticalSidebarMini: false, // options[Boolean] : true, false(default)
  verticalSidebarDrawer: true, // options[Boolean] : true, false(default)
  verticalCompactSidebarDrawer: true, // options[Boolean] : true, false(default)
  verticalSaasSidebarDrawer: true, // options[Boolean] : true, false(default)
  showBreadcrumb: true, // options[Boolean] : true, false(default)

  layout: "VerticalSidebar", //VerticalWhiteSidebar,VerticalCompactSidebar,VerticalSaasLayout,VerticalSidebar,HorizontalBar
  isLoading: false,

  isDark: true,
  verticalSidebarDrawerColor: "white", // primary,white,sucsess,warning,etc
  appBarColor: "white" // primary,white,sucsess,warning,etc
};

export const themePreset = {
  breakpoint: {
    scrollBarWidth: 16,
    thresholds: {
      xs: 600,
      sm: 960,
      md: 1280,
      lg: 1920
    }
  },

  rtl: false,

  theme: {
    default: "dark",
    disable: false,
    options: {
      cspNonce: undefined,
      customProperties: true,
      minifyTheme: undefined,
      themeCache: undefined
    },
    themes: {
      light: {
        primary: colors.blue,
        secondary: "#304156",
        success: colors.green,
        danger: colors.red,
        warning: colors.deepOrange,
        info: colors.indigo,

        dark: "#242939",

        background: "#f2f3f8"
      },
      dark: {
        primary: colors.blue,
        secondary: "#304156",
        success: colors.green,
        danger: colors.red,
        warning: colors.deepOrange,
        info: colors.indigo
      }
    }
  }
};

I would expect that setting the themePreset.theme.default to "dark" would configure this properly, but it remains light theme.

Thanks!