import { ComponentInstance } from '@uniformdev/canvas'; import React from 'react'; type ParameterTextValue = string | undefined; type PureUniformTextProps = { /** * The name of the HTML tag to render. * @default "span" */ as?: React.ElementType; /** The ID of the parameter. */ parameterId: string; /** The component that contains the parameter. */ component: ComponentInstance; skipCustomRendering: boolean; isContextualEditing: boolean; /** * When set to true, it adds `whiteSpace: 'pre-wrap'` to the styles of the root element to allow the rendering of line breaks. * @default false */ isMultiline?: boolean; /** * Sets the value to show in Canvas editor when the parameter value is empty. * Can be a static string, or a function to generate the placeholder out of parameter info. * @default undefined */ placeholder?: string | ((parameter: { id: string; }) => string | undefined); /** * A function to customize the rendering of the parameter value. Useful to format the value before rendering it. * @default "(value) => value" */ render?: (value: ParameterTextValue) => React.ReactNode; } & Omit, 'children' | 'placeholder'>; /** * Renders text parameters. Offers inline editing capability out of the box. */ declare const PureUniformText: ({ as: Tag, parameterId, component, skipCustomRendering, isContextualEditing, isMultiline, placeholder, render, ...props }: PureUniformTextProps) => React.JSX.Element | null; export { PureUniformText as P, type PureUniformTextProps as a };