UNPKG

@primer/components

Version:
15 lines (14 loc) 844 B
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;