tailwind-joy
Version:
React component library that styles the components of Joy UI in the Tailwind CSS way.
37 lines (36 loc) • 2.01 kB
TypeScript
import type { ComponentProps, ForwardedRef, ReactNode } from 'react';
import type { ReactTags, DynamicComponentProps, Difference, BaseVariants, GeneratorInput } from '../base/types';
type PassingProps = Pick<ComponentProps<'input'>, 'autoComplete' | 'autoFocus' | 'defaultValue' | 'disabled' | 'id' | 'name' | 'onBlur' | 'onChange' | 'onClick' | 'onFocus' | 'onKeyDown' | 'onKeyUp' | 'placeholder' | 'readOnly' | 'required' | 'type' | 'value'>;
type InputRootVariants = BaseVariants & {
className?: string;
endDecorator?: ReactNode;
error?: boolean;
fullWidth?: boolean;
startDecorator?: ReactNode;
} & {
slotProps?: {
root?: ComponentProps<'div'>;
input?: ComponentProps<'input'>;
startDecorator?: ComponentProps<'div'>;
endDecorator?: ComponentProps<'div'>;
};
} & PassingProps;
type InputRootProps<T extends ReactTags> = Difference<DynamicComponentProps<T>, InputRootVariants> & InputRootVariants;
export declare const Input: <T extends keyof JSX.IntrinsicElements = "div">(props: Difference<DynamicComponentProps<T>, InputRootVariants> & BaseVariants & {
className?: string | undefined;
endDecorator?: ReactNode;
error?: boolean | undefined;
fullWidth?: boolean | undefined;
startDecorator?: ReactNode;
} & {
slotProps?: {
root?: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement> | undefined;
input?: import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> | undefined;
startDecorator?: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement> | undefined;
endDecorator?: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement> | undefined;
} | undefined;
} & PassingProps & {
ref?: ForwardedRef<unknown> | undefined;
}) => JSX.Element;
export declare const generatorInputs: GeneratorInput[];
export {};