This commit is contained in:
Nathan Bierema 2020-05-19 00:25:21 -04:00
parent b8ef7ace35
commit b94d6b2b06
2 changed files with 3 additions and 2 deletions

View File

@ -7,6 +7,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import JSONNode from './JSONNode';
import createStylingFromTheme from './createStylingFromTheme';
import './react-base16-styling';
import {
Base16Theme,
invertTheme,
@ -108,7 +109,7 @@ function getStateFromProps(props: Props) {
} else {
theme = {
...theme,
extend: invertTheme(theme.extend)
extend: invertTheme(theme.extend as Base16Theme)
} as StylingConfig;
}
} else if (theme) {

View File

@ -33,7 +33,7 @@ declare module 'react-base16-styling' {
| ((styling: Styling, ...rest: any[]) => Styling);
export type StylingConfig = { [name: string]: StylingValue } & {
extend?: string | Base16Theme;
extend?: string | Base16Theme | StylingValue;
};
export type Theme = string | Base16Theme | StylingConfig;