@primer/components
Version:
Primer react components
15 lines (14 loc) • 844 B
TypeScript
import React from 'react';
import { ComponentProps, Merge } from './utils/types';
import UnstyledTextInput from './_UnstyledTextInput';
import TextInputWrapper from './_TextInputWrapper';
declare type NonPassthroughProps = {
className?: string;
icon?: React.ComponentType<{
className?: string;
}>;
} & Pick<ComponentProps<typeof TextInputWrapper>, 'block' | 'contrast' | 'disabled' | 'sx' | 'theme' | 'width' | 'maxWidth' | 'minWidth' | 'variant'>;
declare type TextInputInternalProps = Merge<React.ComponentPropsWithoutRef<typeof UnstyledTextInput>, NonPassthroughProps>;
declare const TextInput: React.ForwardRefExoticComponent<Pick<TextInputInternalProps, string | number | symbol> & React.RefAttributes<HTMLInputElement>>;
export declare type TextInputProps = ComponentProps<typeof TextInput>;
export default TextInput;