import { ComponentConstraint, VisageComponent, UnionToIntersection, StyleFunction, ExtractVisageComponentProps } from './types'; import { StyleSheet } from './styleSheet'; /** * Creates a Visage component */ export declare function createComponent[] = undefined, TProps = TVariants extends Record[] ? ExtractVisageComponentProps & UnionToIntersection : ExtractVisageComponentProps, TDefaultProps extends Partial = any>(defaultAs: TDefaultComponent, { asMemo, defaultProps, defaultStyles, styles, displayName: name, variants, }?: { /** * Should component be wrapped React.memo * * Default is true */ asMemo?: boolean; /** Component's display name, if none is provided component name is inferred */ displayName?: string; defaultProps?: TDefaultProps; /** * This is alias for styles in options, if you specify both, only styles option is accepted */ defaultStyles?: StyleSheet | StyleFunction; /** * Component's styles * * This is similar to styled.div({}) for example * * If you don't rely on props, please don't use a function to prevent unnecessary * styles invalidation */ styles?: StyleSheet | StyleFunction; /** * Component variant prop processors, these are used to tell the component * which variant props should be stripped and work as a syntactic sugar to get types * for variants in typescript */ variants?: TVariants; }): VisageComponent & Partial>>>; //# sourceMappingURL=createComponent.d.ts.map