@snowball-tech/fractal
Version:
Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS
35 lines (32 loc) • 1.23 kB
TypeScript
import { AllHTMLAttributes, ReactNode, MouseEvent, ChangeEvent } from 'react';
import { B as ButtonProps } from './Button.types-Dt-FZKMg.js';
interface InputTextProps extends Omit<AllHTMLAttributes<HTMLInputElement>, 'label' | 'onChange' | 'prefix'> {
autoFocus?: boolean;
button?: {
position?: 'left' | 'right';
} & Omit<ButtonProps, 'onClick' | 'variant'>;
defaultValue?: number | string;
description?: ReactNode;
disabled?: boolean;
error?: Error | ReactNode;
extraSmall?: boolean;
fullWidth?: boolean;
id?: string;
label?: ReactNode;
labelElement?: keyof HTMLElementTagNameMap;
name?: string;
placeholder?: string;
prefix?: ReactNode;
readOnly?: boolean;
required?: boolean;
selectOnFocus?: boolean;
success?: ReactNode;
suffix?: ReactNode;
type?: 'date' | 'datetime-local' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'time' | 'url';
value?: number | string;
withButton?: boolean;
withSpinButton?: boolean;
onButtonClick?: (event: MouseEvent<HTMLElement>) => void;
onChange?: (event: ChangeEvent<HTMLInputElement>, newValue: string) => void;
}
export type { InputTextProps as I };