UNPKG

@devseed-ui/theme-provider

Version:
34 lines (29 loc) 922 B
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; }; }