@blockstack/ui
Version:
Blockstack UI components built using React and styled-components with styled-system.
24 lines (23 loc) • 1.17 kB
TypeScript
import * as React from 'react';
import { PseudoBoxProps } from '../pseudo-box';
import { Omit } from '../common-types';
export declare type InputVariant = 'outline' | 'unstyled' | 'flushed' | 'filled';
export declare type InputSize = 'default';
export interface InputPropsBase<T = HTMLInputElement> {
isDisabled?: React.InputHTMLAttributes<T>['disabled'];
isInvalid?: boolean;
isRequired?: React.InputHTMLAttributes<T>['required'];
isFullWidth?: boolean;
isReadOnly?: React.InputHTMLAttributes<T>['readOnly'];
size?: InputSize;
variant?: InputVariant;
as?: React.ElementType;
'aria-label'?: React.AriaAttributes['aria-label'];
'aria-describedby'?: React.AriaAttributes['aria-describedby'];
focusBorderColor?: string;
textStyle?: string;
}
declare type OmittedTypes = 'size' | 'disabled' | 'required' | 'checked' | 'defaultChecked' | 'readOnly';
declare type InputHTMLAttributes = Omit<React.InputHTMLAttributes<HTMLInputElement>, OmittedTypes>;
export declare type InputProps<T = HTMLInputElement> = InputPropsBase<T> & PseudoBoxProps & InputHTMLAttributes & React.RefAttributes<T>;
export {};