Skip to content

Commit

Permalink
fix: do not provide default colors for ConfigProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoward-eightfold committed Feb 8, 2023
1 parent 7c6bae2 commit ec5f256
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 62 deletions.
24 changes: 0 additions & 24 deletions src/components/ConfigProvider/ConfigProvider.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -549,30 +549,6 @@ Theming.args = {
// customizations the storybook user has applied so far.
themeOptions: {
name: 'blue',
customTheme: {
varTheme: undefined,
tabsTheme: {
label: '--text-secondary-color',
activeLabel: '--primary-color',
activeBackground: 'transparent',
hoverLabel: '--primary-color',
hoverBackground: 'transparent',
indicatorColor: '--primary-color',
smallActiveBackground: 'transparent',
smallHoverBackground: 'transparent',
pillLabel: '--text-secondary-color',
pillActiveLabel: '--primary-color',
pillActiveBackground: '--accent-color-20',
pillHoverLabel: '--primary-color',
pillBackground: '--grey-color-10',
},
navbarTheme: {
background: '--primary-color-80',
textColor: '--primary-color-10',
textHoverBackground: '--primary-color-80',
textHoverColor: '--primary-color-20',
},
},
} as ThemeOptions,
icomoonIconSet: {},
children: <ThemedComponents />,
Expand Down
2 changes: 1 addition & 1 deletion src/components/ConfigProvider/ConfigProvider.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export interface ConfigProviderProps {
size?: Size;
/**
* Options for theming
* @default { name: 'blue', useSystemTheme: false, customTheme: null }
* @default { name: 'blue', customTheme: null }
*/
themeOptions?: ThemeOptions;
}
6 changes: 0 additions & 6 deletions src/components/ConfigProvider/Theming/Theming.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@ export interface ThemeOptions {
* @default blue
*/
name?: ThemeName;
/**
* Use system theme or not
* @default false
* @experimental
*/
useSystemTheme?: boolean;
/**
* Define a custom theme palette
* @type {OcBaseTheme}
Expand Down
34 changes: 3 additions & 31 deletions src/components/ConfigProvider/Theming/themes.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,8 @@
import { OcBaseTheme, OcTheme, OcThemeName } from './Theming.types';

export const themeDefaults: OcBaseTheme = {
textColor: '#1A212E',
textColorSecondary: '#4F5666',
textColorInverse: '#fff',
backgroundColor: '#fff',
successColor: '#2B715F',
warningColor: '#9D6309',
infoColor: '#4F5666',
errorColor: '#993838',
tabsTheme: {
label: '#4F5666',
activeLabel: '#146DA6',
activeBackground: 'transparent',
hoverLabel: '#054D7B',
hoverBackground: 'transparent',
indicatorColor: '#146DA6',
smallActiveBackground: 'transparent',
smallHoverBackground: 'transparent',
pillLabel: '#4F5666',
pillActiveLabel: '#054D7B',
pillActiveBackground: '#B0F3FE',
pillHoverLabel: '#054D7B',
pillBackground: '#F6F7F8',
},
navbarTheme: {
background: '#054D7B',
textColor: '#fff',
textHoverBackground: '#054D7B',
textHoverColor: '#fff',
},
};
// NOTE: Theme should not provide defaults. The css variables provide
// the defaults, and the ConfigProvider theme can override them accordingly.
export const themeDefaults: OcBaseTheme = {};

export const red: OcTheme = {
primaryColor: '#6C2222',
Expand Down

0 comments on commit ec5f256

Please sign in to comment.