aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-tools-pages/ts/components/Base.tsx
diff options
context:
space:
mode:
authorAugust Skare <post@augustskare.no>2018-11-16 18:05:30 +0800
committerAugust Skare <post@augustskare.no>2018-11-16 18:05:30 +0800
commit54bd7df900316504e4403bc94cffd92930a6c763 (patch)
tree7b386224e5746be65bfddc094cc5b26f7c018e19 /packages/dev-tools-pages/ts/components/Base.tsx
parent5afef5fe820674abfbdf58226ed0a6920b5c74f7 (diff)
downloaddexon-0x-contracts-54bd7df900316504e4403bc94cffd92930a6c763.tar.gz
dexon-0x-contracts-54bd7df900316504e4403bc94cffd92930a6c763.tar.zst
dexon-0x-contracts-54bd7df900316504e4403bc94cffd92930a6c763.zip
fix linting + code syntax for statless components
Diffstat (limited to 'packages/dev-tools-pages/ts/components/Base.tsx')
-rw-r--r--packages/dev-tools-pages/ts/components/Base.tsx33
1 files changed, 18 insertions, 15 deletions
diff --git a/packages/dev-tools-pages/ts/components/Base.tsx b/packages/dev-tools-pages/ts/components/Base.tsx
index 54340c9de..a1b066d85 100644
--- a/packages/dev-tools-pages/ts/components/Base.tsx
+++ b/packages/dev-tools-pages/ts/components/Base.tsx
@@ -1,24 +1,27 @@
import * as React from 'react';
+import { ThemeProvider } from 'styled-components';
-import ThemeContext from 'ts/context';
-import GlobalStyles from 'ts/globalStyles';
-import Header from 'ts/components/Header';
-import Footer from 'ts/components/Footer';
+import { Footer } from 'ts/components/Footer';
+import { Header } from 'ts/components/Header';
+import { ThemeContext } from 'ts/context';
+import { GlobalStyles } from 'ts/globalStyles';
interface BaseProps {
context: any;
children: React.ReactNode;
}
-function Base(props: BaseProps) {
- return (
- <ThemeContext.Provider value={props.context}>
- <GlobalStyles />
- <Header />
- {props.children}
- <Footer />
- </ThemeContext.Provider>
- );
-}
+const Base: React.StatelessComponent<BaseProps> = props => (
+ <ThemeContext.Provider value={props.context}>
+ <ThemeProvider theme={props.context}>
+ <React.Fragment>
+ <GlobalStyles />
+ <Header />
+ {props.children}
+ <Footer />
+ </React.Fragment>
+ </ThemeProvider>
+ </ThemeContext.Provider>
+);
-export default Base;
+export { Base };