UNPKG

@eccenca/gui-elements

Version:

GUI elements based on other libraries, usable in React application, written in Typescript.

33 lines (32 loc) 1.52 kB
import React from "react"; import { MaybeElement, TextAreaProps as BlueprintTextAreaProps } from "@blueprintjs/core"; import { IntentTypes } from "../../common/Intent"; import { ValidIconName } from "../Icon/canonicalIconNames"; import { InvisibleCharacterWarningProps } from "./useTextValidation"; export interface TextAreaProps extends Omit<BlueprintTextAreaProps, "intent"> { /** * Intent state of the text area. */ intent?: IntentTypes | "edited" | "removed"; /** * If set, allows to be informed of invisible, hard to spot characters in the string value. */ invisibleCharacterWarning?: InvisibleCharacterWarningProps; /** * Left aligned icon, can be a canonical icon name or an `Icon` element. * This will update left padding on the text area. */ leftIcon?: ValidIconName | MaybeElement; /** * Element to render on right side of text area. Should be not too large. * This will update right padding on the text area. */ rightElement?: JSX.Element; /** * Add HTML properties to the wrapper element. * The element wraps `TextArea` in case of a given `wrapperDivProps`, `leftIcon` or `rightElement` property. */ wrapperDivProps?: Omit<React.HTMLAttributes<HTMLDivElement>, "children">; } export declare const TextArea: ({ className, rows, invisibleCharacterWarning, leftIcon, rightElement, wrapperDivProps, intent, ...otherBlueprintTextAreaProps }: TextAreaProps) => React.JSX.Element; export default TextArea;