native-variants
Version:
A library for handling variants in React Native components with theme support.
12 lines (11 loc) • 659 B
TypeScript
import { Base, Config, DefaultVariants, DefineConfig, Theme, Variants } from "../types.js";
export declare function styled<S extends string, V extends Variants<S>>(config: Config<S, V>): (props?: DefaultVariants<S, V>) => Base<S>;
export declare function createNVA<Tokens extends Theme>({ theme, }?: {
theme?: Tokens;
}): {
theme: Tokens;
styled: {
<S extends string, V extends Variants<S>>(config: Config<S, V>): (props?: DefaultVariants<S, V>) => Base<S>;
<S extends string, V extends Variants<S>>(configFactory: (defineConfig: DefineConfig, theme: Tokens) => Config<S, V>): (props?: DefaultVariants<S, V>) => Base<S>;
};
};