mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
init
This commit is contained in:
14
content/templates/react/theme/provider.tsx
Normal file
14
content/templates/react/theme/provider.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import React, { ReactNode } from 'react';
|
||||
import { ThemeProvider as StyledThemeProvider } from 'styled-components';
|
||||
import { Theme } from './theme';
|
||||
|
||||
type Props = {
|
||||
theme: Theme;
|
||||
children: ReactNode;
|
||||
};
|
||||
|
||||
const ThemeProvider: React.FC<Props> = ({ theme, children }) => (
|
||||
<StyledThemeProvider theme={theme}>{children}</StyledThemeProvider>
|
||||
);
|
||||
|
||||
export { ThemeProvider };
|
||||
Reference in New Issue
Block a user