diff --git a/packages/theme-provider/src/index.tsx b/packages/theme-provider/src/index.tsx index ae8bb21c4..cee5b93b0 100644 --- a/packages/theme-provider/src/index.tsx +++ b/packages/theme-provider/src/index.tsx @@ -56,30 +56,3 @@ export const ThemeUIProvider = ({ theme, children }: ThemeProviderProps) => { ) } - -/** @deprecated ThemeProvider is now called ThemeUIProvider to reduce confusion with Emotion */ -export const ThemeProvider: React.FC = ({ - theme, - children, -}) => { - React.useEffect(() => { - if (process.env.NODE_ENV !== 'production') { - console.warn( - '[theme-ui] The export ThemeProvider is deprecated and is now called ThemeUIProvider to reduce confusion with Emotion. Please update your import; ThemeProvider will be removed in a future version.' - ) - } - }, []) - - const outer = useThemeUI() - - const isTopLevel = outer === __themeUiDefaultContextValue - - return ( - - - {isTopLevel && } - {children} - - - ) -} diff --git a/packages/theme-ui/test/index.tsx b/packages/theme-ui/test/index.tsx index 337277fa3..75cdc5e41 100644 --- a/packages/theme-ui/test/index.tsx +++ b/packages/theme-ui/test/index.tsx @@ -8,7 +8,6 @@ import mockConsole from 'jest-mock-console' import { fireEvent, render, renderJSON } from '@theme-ui/test-utils' import { - ThemeProvider as DeprecatedThemeProvider, ThemeUIProvider, jsx, BaseStyles, @@ -51,17 +50,6 @@ test('warns when multiple versions of emotion are installed', () => { restore() }) -test('warns deprecated ThemeUIProvider', () => { - const restore = mockConsole() - render( - -
- - ) - expect(console.warn).toHaveBeenCalled() - restore() -}) - test('functional themes receive outer theme', () => { const outer: Theme = { config: {