packages/core/layout/Page: port to typescript

This commit is contained in:
Patrik Oldsberg
2020-02-25 10:45:09 +01:00
parent a958050c79
commit cb2a75bf66
2 changed files with 5 additions and 3 deletions
@@ -1,11 +1,13 @@
import React, { Component } from 'react';
import { theme } from './PageThemeProvider';
export const Theme = React.createContext({});
type Theme = typeof theme['service'];
class Page extends Component {
export const Theme = React.createContext<Theme>(theme.service);
class Page extends Component<{ theme: Theme }> {
static defaultProps = {
theme: theme.other,
theme: theme.home,
};
render() {