@furystack/shades-common-components
Version:
Common UI components for FuryStack Shades
45 lines • 1.78 kB
TypeScript
import type { InputValidationResult } from '../inputs/input.js';
export type MarkdownInputProps = {
/** The current Markdown string */
value: string;
/** Called when the value changes */
onValueChange?: (newValue: string) => void;
/** Maximum image file size in bytes for base64 paste. Defaults to 256KB. */
maxImageSizeBytes?: number;
/** Whether the textarea is read-only */
readOnly?: boolean;
/** Whether the textarea is disabled */
disabled?: boolean;
/** Placeholder text */
placeholder?: string;
/** Label shown above the textarea */
labelTitle?: string;
/** Number of visible text rows */
rows?: number;
/** Form field name for FormService integration */
name?: string;
/** Whether the field is required */
required?: boolean;
/** Custom validation callback */
getValidationResult?: (options: {
value: string;
}) => InputValidationResult;
/** Optional helper text callback */
getHelperText?: (options: {
value: string;
validationResult?: InputValidationResult;
}) => JSX.Element | string;
/** When true, suppresses visual label and helper text rendering while keeping form mechanics */
hideChrome?: boolean;
};
/**
* Markdown text input with base64 image paste support.
* When the user pastes an image below the configured size limit,
* it is inlined as a `` Markdown image.
*/
export declare const MarkdownInput: (props: MarkdownInputProps & Omit<Partial<HTMLElement>, "style"> & {
style?: Partial<CSSStyleDeclaration>;
} & {
ref?: import("@furystack/shades").RefObject<Element>;
}, children?: import("@furystack/shades").ChildrenList) => JSX.Element;
//# sourceMappingURL=markdown-input.d.ts.map