UNPKG

rmwc

Version:

A thin React wrapper for Material Design (Web) Components

24 lines (23 loc) 1.42 kB
import * as React from 'react'; declare type ThemeOptionT = 'primary' | 'secondary' | 'background' | 'surface' | 'onPrimary' | 'onSecondary' | 'onSurface' | 'textPrimaryOnBackground' | 'textSecondaryOnBackground' | 'textHintOnBackground' | 'textDisabledOnBackground' | 'textIconOnBackground' | 'textPrimaryOnLight' | 'textSecondaryOnLight' | 'textHintOnLight' | 'textDisabledOnLight' | 'textIconOnLight' | 'textPrimaryOnDark' | 'textSecondaryOnDark' | 'textHintOnDark' | 'textDisabledOnDark' | 'textIconOnDark'; export declare type ThemePropsT = { /** A theme option as a string, a space separated string for multiple values, or an array of valid theme options. */ use: string | ThemeOptionT[]; /** Collapse the styles directly onto the child component. This eliminates the need for a wrapping `span` element and may be required for applying things like background-colors. */ wrap?: boolean; }; /** * A Theme Component. */ export declare const Theme: React.ComponentType<ThemePropsT>; declare type ThemeProviderPropsT = { /** Any theme option pointing to a valid CSS value. */ options: { [key: string]: string; }; /** Additional standard inline styles that will be merged into the style tag. */ style?: Object; }; /** A ThemeProvider. This sets theme colors for its child tree. */ export declare const ThemeProvider: React.ComponentType<ThemeProviderPropsT>; export {};