UNPKG

@primer/components

Version:
26 lines (25 loc) 1.85 kB
import React from 'react'; import { MaxWidthProps, MinWidthProps, WidthProps } from 'styled-system'; import type * as Polymorphic from "@radix-ui/react-polymorphic"; import { SxProp } from './sx'; import { ComponentProps } from './utils/types'; import UnstyledTextInput from './_UnstyledTextInput'; declare const Wrapper: import("styled-components").StyledComponent<"span", any, { disabled?: boolean | undefined; hasIcon?: boolean | undefined; block?: boolean | undefined; contrast?: boolean | undefined; variant?: "large" | "small" | undefined; } & WidthProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Width<import("styled-system").TLengthStyledSystem>> & MinWidthProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>> & MaxWidthProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.MaxWidth<import("styled-system").TLengthStyledSystem>> & SxProp, never>; declare type NonPassthroughProps = { className?: string; icon?: React.ComponentType<{ className?: string; }>; inputComponent?: React.ComponentType<HTMLInputElement>; wrapperRef?: React.RefObject<HTMLSpanElement>; } & Pick<ComponentProps<typeof Wrapper>, 'block' | 'contrast' | 'disabled' | 'sx' | 'theme' | 'width' | 'maxWidth' | 'minWidth' | 'variant'>; declare type TextInputInternalProps = NonPassthroughProps & Omit<React.ComponentPropsWithoutRef<typeof UnstyledTextInput>, keyof NonPassthroughProps>; declare const TextInput: Polymorphic.ForwardRefComponent<"input", TextInputInternalProps>; export declare type TextInputProps = ComponentProps<typeof TextInput>; export default TextInput;