Skip to content

Commit

Permalink
fix(core): export default vs export const default
Browse files Browse the repository at this point in the history
  • Loading branch information
snrs-art committed Jul 13, 2023
1 parent 9bbc461 commit dd3faca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export type DefaultColor = typeof defaultColorsOrder[number];

const colorsOrder = defaultColorsOrder.map(color => vars.colors[color]);

const theme: ThemePropsVars = {
export const theme: ThemePropsVars = {
variables: vars.variables,
palette: vars.colors,
breakpoints: getBreakpoints(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ describe('DSProvider', function() {
it('should render translated text', function() {
expect(C.text()).toBe('Click this');
});
it.todo('index module exports theme as named export');
it.todo('index module exports theme as the default export');
it.todo('theme is not reexported as it was exported with `export const default = theme`, but `export default theme`');
});
2 changes: 1 addition & 1 deletion packages/components/core/src/js/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export { default as DSProvider } from './DSProvider';
export { default as mediaQuery } from './mediaQuery/mediaQuery';
export { default as theme, useTheme, defaultColorsOrder } from './DSProvider/ThemeProvider/theme';
export { theme, useTheme, defaultColorsOrder } from './DSProvider/ThemeProvider/theme';

export type { ThemePropsVars, ThemeProps, WithTheme, DefaultColor } from './DSProvider/ThemeProvider/theme';

0 comments on commit dd3faca

Please sign in to comment.