import * as React from 'react'; import type { ComponentRenderFn, NativeProps, RenderProp, ZestStyle } from '../types'; import { type UseRenderElementParameters } from './useRenderElement'; /** * Renders a Zest element. * * Public façade over the internal render engine, for consumers building their * own Zest-style primitives. * * @public */ export declare function useRender, RenderedElementType, Enabled extends boolean | undefined = undefined>(params: useRender.Parameters): useRender.ReturnValue; export interface UseRenderParameters extends UseRenderElementParameters { /** * The React element or a function that returns one to override the default element. */ render?: RenderProp | undefined; /** * The default React Native component to render when `render` is not provided. * @default View */ defaultComponent?: React.ElementType | undefined; /** * A class name, or a function of the component's state returning one. * * `useRender` forwards its own parameters to the render engine as the * component props, so this is read exactly as it is on a built-in part — * declaring it here is what lets a consumer pass their `className` through. */ className?: string | ((state: State) => string | undefined) | undefined; /** * A React Native style, or a function of the component's state returning one. * Composed *after* the styles in `props`, so the consumer's style wins. */ style?: ZestStyle; } export type UseRenderReturnValue = Enabled extends false ? null : React.ReactElement; export declare namespace useRender { type RenderProp> = React.ReactElement | ComponentRenderFn; type Parameters = UseRenderParameters; type ReturnValue = UseRenderReturnValue; } //# sourceMappingURL=useRender.d.ts.map