@indoqa/style-system
Version:
A style system for React with Typescript typed theme support and several base components.
12 lines (11 loc) • 938 B
TypeScript
import { IStyle } from 'fela';
import { FelaStyle, StyleFunction } from 'react-fela';
import { BaseTheme } from '../theming/baseTheme';
import { NamedBreakPoint } from '../theming/sortBreakpoints';
import { WithBaseTheme } from './types';
export declare const THEME_NOT_AVAILABLE_ERR_MSG: string;
export declare const addUnitIfNeeded: (value: any | string, propertyUnit?: string | undefined) => string;
export declare function getPropsByBreakpoint(props: any, breakpoints: NamedBreakPoint[]): any[];
export declare type ResponsiveStyleFunction<T extends BaseTheme> = (props: any, theme: T, outsideMediaQuery: boolean) => IStyle;
export declare function createResponsiveStyles<T extends BaseTheme>(props: any & WithBaseTheme, styleFunction: ResponsiveStyleFunction<T>): IStyle;
export declare function mergeThemedStyles<T extends BaseTheme, P>(componentStyle: StyleFunction<T, P> | IStyle, passedStyle?: FelaStyle<T, P>): FelaStyle<T, P>;