diff --git a/README.md b/README.md index 194f456..5f9c6af 100644 --- a/README.md +++ b/README.md @@ -147,14 +147,14 @@ const config = { snippetVersion: 6, }, themeConfig: { - default: 'light', + defaultTheme: 'light', // Hides the theme change switch // Useful if you want to support a single color mode disableSwitch: false, // Should we use the prefers-color-scheme media-query, - // using user system preferences, instead of the hardcoded default + // using user system preferences, instead of the hardcoded defaultTheme respectPrefersColorScheme: true, // Available themes. To remove any theme, exclude from here. @@ -220,7 +220,7 @@ The default theme can be specified. module.exports = { // ... themeConfig: { - default: 'light', + defaultTheme: 'light', // ... }, }; diff --git a/src/components/GitProfile.jsx b/src/components/GitProfile.jsx index 922bbe4..b02ad6d 100644 --- a/src/components/GitProfile.jsx +++ b/src/components/GitProfile.jsx @@ -311,7 +311,7 @@ GitProfile.propTypes = { snippetVersion: PropTypes.number, }), themeConfig: PropTypes.shape({ - default: PropTypes.string.isRequired, + defaultTheme: PropTypes.string.isRequired, disableSwitch: PropTypes.bool.isRequired, respectPrefersColorScheme: PropTypes.bool.isRequired, themes: PropTypes.array.isRequired, diff --git a/src/components/theme-changer/index.jsx b/src/components/theme-changer/index.jsx index 00ed5f1..0e5c92d 100644 --- a/src/components/theme-changer/index.jsx +++ b/src/components/theme-changer/index.jsx @@ -27,7 +27,7 @@ const ThemeChanger = ({ theme, setTheme, loading, themeConfig }) => { {loading ? skeleton({ width: 'w-16', height: 'h-5' }) - : theme === themeConfig.default + : theme === themeConfig.defaultTheme ? 'Default' : theme} @@ -61,9 +61,9 @@ const ThemeChanger = ({ theme, setTheme, loading, themeConfig }) => { >