UNPKG

@fluentui/react-theme-provider

Version:

Fluent UI React theme provider component, hook, and theme related utilities.

20 lines (19 loc) 750 B
import { IStyle } from '@uifabric/merge-styles'; import { Theme } from '@fluentui/theme'; import { StyleRenderer } from './styleRenderers/types'; /** Options that can be provided to the hook generated by `makeStyles`. */ export declare type UseStylesOptions = { theme?: Theme; renderer?: StyleRenderer; }; /** * Registers a css object, optionally as a function of the theme. * * @param styleOrFunction - Either a css javascript object, or a function which takes in `ITheme` * and returns a css javascript object. */ export declare function makeStyles<TStyleSet extends { [key: string]: IStyle; }>(styleOrFunction: TStyleSet | ((theme: Theme) => TStyleSet)): (options?: UseStylesOptions) => { [key in keyof TStyleSet]: string; };