@coconut-software/ui
Version:
React components for faster and easier web development.
23 lines (22 loc) • 1 kB
TypeScript
import type { ChangeEvent, ReactNode, Ref } from 'react';
import type SvgIcon from '../SvgIcon/SvgIcon';
import type { TextInputColor, TextInputSize, TextInputVariant } from '../TextInput/styles';
export type TextProps = {
color?: TextInputColor;
dataSet?: Record<string, string | undefined>;
defaultValue?: string;
disabled?: boolean;
displayInputRef: Ref<HTMLInputElement>;
error?: boolean;
helperText?: string;
inputRef: Ref<HTMLInputElement>;
label: string;
name?: string;
onChange?: (event: ChangeEvent<HTMLInputElement>, actions: Record<string, () => void>) => void;
revert: () => () => void;
size?: TextInputSize;
startAdornment?: typeof SvgIcon | ReactNode;
variant?: TextInputVariant;
};
declare function Text({ color, dataSet, defaultValue, disabled, displayInputRef, error, helperText, inputRef, label, onChange, name, revert, size, startAdornment, variant, }: TextProps): JSX.Element;
export default Text;