@vertisanpro/flowbite-react
Version:
Non-Official React components built for Flowbite and Tailwind CSS
46 lines (45 loc) • 1.58 kB
TypeScript
import type { ComponentProps, FC, ReactNode } from 'react';
import React from 'react';
import type { DeepPartial } from '../../types';
import type { FlowbiteBoolean, FlowbiteColors, FlowbiteSizes } from '../Flowbite';
export interface FlowbiteTextInputTheme {
base: string;
addon: string;
field: {
base: string;
icon: {
base: string;
svg: string;
};
rightIcon: {
base: string;
svg: string;
};
input: {
base: string;
sizes: FlowbiteTextInputSizes;
colors: FlowbiteTextInputColors;
withIcon: FlowbiteBoolean;
withRightIcon: FlowbiteBoolean;
withAddon: FlowbiteBoolean;
withShadow: FlowbiteBoolean;
};
};
}
export interface FlowbiteTextInputColors extends Pick<FlowbiteColors, 'gray' | 'info' | 'failure' | 'warning' | 'success'> {
[key: string]: string;
}
export interface FlowbiteTextInputSizes extends Pick<FlowbiteSizes, 'sm' | 'md' | 'lg'> {
[key: string]: string;
}
export interface TextInputProps extends Omit<ComponentProps<'input'>, 'ref' | 'color'> {
addon?: ReactNode;
color?: keyof FlowbiteTextInputColors;
helperText?: ReactNode;
icon?: FC<ComponentProps<'svg'>>;
rightIcon?: FC<ComponentProps<'svg'>>;
shadow?: boolean;
sizing?: keyof FlowbiteTextInputSizes;
theme?: DeepPartial<FlowbiteTextInputTheme>;
}
export declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;