UNPKG

rxn-grife

Version:

🎀 Programmatic Styling Library for React, React Native and Expo.

35 lines (34 loc) • 1.04 kB
import { ViewStyle, TextStyle, ImageStyle } from "react-native"; export interface Element { /** * Element's type (displayName or name) */ type: string | undefined; style: { /** * Set styles (overwriting) for element (also ignoring inline styles) */ set: (style: ViewStyle | TextStyle | ImageStyle) => void; /** * Push styles for element before already defined styles (less important) */ pushBefore: (style: ViewStyle | TextStyle | ImageStyle) => void; /** * Push styles for element after already defined styles (more important) */ pushAfter: (style: ViewStyle | TextStyle | ImageStyle) => void; }; /** * ELement id (defined on props) */ id?: string; /** * ELement className (defined on props) */ className?: string; /** * Array of element's children */ children: Array<Element>; } export type ElementCallback = (el: Element) => void;