@devseed-ui/theme-provider
Version:
devseed UI Kit Theme
34 lines (29 loc) • 922 B
TypeScript
import './theme';
import React from 'react';
import { DefaultTheme } from 'styled-components';
declare module '@devseed-ui/theme-provider' {
/**
* Creates a UI theme by combining the provided options with the default ones.
* When an override for a value is provided, it gets propagated to all the
* variables that use that value. For example: The primary color will be used
* for links unless a color for "link" is provided.
*
* @param {DefaultTheme} definition The theme definition
*
* @returns DefaultTheme
*/
function createUITheme(definition: DefaultTheme): DefaultTheme;
/**
* Theme provider for the ui-library.
* Supports a custom theme through a `theme` prop.
*/
class DevseedUiThemeProvider extends React.Component<
{
theme?: DefaultTheme | ((mainTheme: DefaultTheme) => DefaultTheme);
},
any
> {}
const theme: {
main: DefaultTheme;
};
}