UNPKG

@kwiz/fluentui

Version:

KWIZ common controls for FluentUI

40 lines (39 loc) 1.45 kB
import { InputProps, TextareaProps } from '@fluentui/react-components'; import React from 'react'; interface IProps extends InputProps { /** fire on enter */ onOK?: () => void; /** fire on escape */ onCancel?: () => void; tokens?: { title: string; value: string; replace?: boolean; }[]; tokenMenuLabel?: string; } export declare const InputEx: React.FunctionComponent<React.PropsWithChildren<IProps>>; interface IPropsTextArea extends TextareaProps { fullSize?: boolean; /** recalc the height to grow to show all text */ growNoShrink?: boolean; allowTab?: boolean; /** fire on enter */ onOK?: () => void; /** fire on escape */ onCancel?: () => void; onValueChange?: (e: React.ChangeEvent<HTMLTextAreaElement> | React.KeyboardEvent<HTMLTextAreaElement>, d: { value: string; elm: HTMLTextAreaElement; }) => void; } export declare const TextAreaEx: React.FunctionComponent<React.PropsWithChildren<IPropsTextArea>>; interface INumberProps extends Omit<IProps, "value" | "onChange" | "defaultValue" | "inputMode"> { defaultValue?: number; onChange: (value: number) => void; allowDecimals?: boolean; /** if sent true - onChange will only be called when a valid non-empty value is being set */ required?: boolean; } export declare const InputNumberEx: React.FunctionComponent<React.PropsWithChildren<INumberProps>>; export {};