Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
xugao committed Aug 21, 2020
1 parent 952fe73 commit 20e6827
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ export const ThemeProvider: React.ForwardRefExoticComponent<ThemeProviderProps &

// @public
export interface ThemeProviderProps extends React.HTMLAttributes<HTMLDivElement> {
// (undocumented)
applyToBody?: boolean;
applyTo?: 'element' | 'body';
theme?: PartialTheme | Theme;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/react-theme-provider/src/ThemeProvider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const darkTheme = mergeThemes({
});

describe('ThemeProvider', () => {
fit('renders a div', () => {
it('renders a div', () => {
const component = renderer.create(<ThemeProvider>Hello</ThemeProvider>);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
Expand Down
4 changes: 2 additions & 2 deletions packages/react-theme-provider/src/ThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { mergeThemes } from './mergeThemes';
import { useTheme } from './useTheme';
import { getTokens } from './getTokens';
import { useApplyThemeToBody } from './utilities/useApplyThemeToBody';
import { getBodyStyles } from './utilities/getBodyStyles';
import { getBodyStyles } from './ThemeProvider.styles';

function createCustomizerContext(theme: Theme): ICustomizerContext {
return {
Expand Down Expand Up @@ -47,7 +47,7 @@ export const ThemeProvider = React.forwardRef<HTMLDivElement, ThemeProviderProps
);

const bodyClass = getBodyStyles(fullTheme?.tokens?.body);
const rootClass = cx(className, bodyClass) || undefined;
const rootClass = cx(className, bodyClass);

// Register stylesheets as needed.
useStylesheet(fullTheme.stylesheets);
Expand Down
27 changes: 0 additions & 27 deletions packages/react-theme-provider/src/utilities/getBodyStyles.ts

This file was deleted.

0 comments on commit 20e6827

Please sign in to comment.