initial commit

This commit is contained in:
August Skare
2018-10-18 13:28:44 +02:00
parent c616b53c9c
commit b158a6d722
55 changed files with 1223 additions and 1020 deletions

View File

@@ -0,0 +1,23 @@
import * as React from 'react';
import ThemeContext from '../context';
interface Props {
title?: string;
name?: string;
subtitle?: string;
tagline?: string;
icon?: React.ReactNode;
colors?: any;
}
function withContext(WrappedComponent: any) {
function ComponentWithContext(props: any) {
return <ThemeContext.Consumer>{data => <WrappedComponent {...data} {...props} />}</ThemeContext.Consumer>;
}
return ComponentWithContext;
}
export default withContext;
export { withContext, Props };