UNPKG

@docsvision/webclient

Version:

Type definitions for DocsVision WebClient scripts and extensions.

88 lines (87 loc) 2.82 kB
import React from "react"; /** @internal */ export interface ILabeledText { /** Label to text value */ label: string; /** Text value to show */ text: React.ReactNode; /** * If this parameter true and labelText specified, text stub (dashed line) will replace empty text. * Default value: false */ showEmpty?: boolean; visible?: boolean; className?: string; /** Click on text element handler */ onTextClick?: (ev: React.MouseEvent<any> | React.KeyboardEvent<any> | React.FocusEvent<any>) => void; /** Click on icon element handler */ onIconClick?: (ev: React.MouseEvent<any> | React.KeyboardEvent<any>) => void; /** Ref to text element handler */ attachText?: (elem: HTMLElement) => void; /** * Show colon after label or not. If value is AutoDots, then requirement for the colons will be detected automaticly. * Default value: AutoDots */ labelDots?: LabelDotsMode; /** * Set label width. */ labelWidth?: number; /** * Set alignmebt of label and text. */ alignment?: boolean; /** * This param describes how value will be placed if control too narrow for it * If param is true, value will go to new line uner a label first * Otherwise it will occupy rest of space to the right of a label * Default value: true. */ wrapLongTextUnderLabel?: boolean; /** * If this parameter true, text will be rendered as clickable (blue and with dashed underline) * Default value: false */ clickableText?: boolean; /** Tooltip */ title?: string; /** Tooltip for value. If not specified, used title value */ valueTitle?: string; /** Tab index for case, when onTextClick specified */ tabIndex?: number; /** Tab index for label icon*/ tabIndexIcon?: number; /** Text content aligning. */ align?: LabeledTextAlign; /** Use custom element instead text */ useCustomValue?: boolean; /** Children ReactNodes */ children?: React.ReactNode; /** Add wrap to text */ addTextWrap?: Function; /** If this parameter true, then an icon is shown next to the text */ displayIcon?: boolean; /** Class name for icon */ iconClass?: string; /** Line wrapping */ isLineWrapping?: boolean; validationMessage?: React.ReactNode; onFocus?: (event: React.FocusEvent<any>) => void; onBlur?: (event: React.FocusEvent<any>) => void; onMouseEnter?: () => void; onMouseLeave?: () => void; } /** @internal */ export declare enum LabelDotsMode { Dots = 0, NoDots = 1, AutoDots = 2 } /** @internal */ export declare enum LabeledTextAlign { Top = 0, Middle = 1, Bottom = 2 } /** @internal */ export declare const LabeledText: (props: ILabeledText) => JSX.Element;