UNPKG

nativestyler

Version:

An advanced styling toolkit for React Native applications, providing dynamic, prop-based styling with efficient caching.

14 lines (13 loc) 534 B
import React from 'react'; import { ViewStyle, ViewProps } from 'react-native'; interface StyleFunctionProps { [key: string]: any; } interface StyledFunctionProps extends ViewProps { [key: string]: any; } type StyledProps<P> = P & StyledFunctionProps & { style?: ViewStyle; }; declare const styled: <P extends Record<string, any>>(Component: React.ComponentType<P>) => (styleFunction: (props: StyledProps<P>, theme: StyleFunctionProps) => ViewStyle) => (props: StyledProps<P>) => React.JSX.Element; export default styled;