@hypothesis/frontend-shared
Version:
Shared components, styles and utilities for Hypothesis projects
17 lines (16 loc) • 700 B
TypeScript
import type { JSX } from 'preact';
import type { FormControlProps, PresentationalProps } from '../../types';
export type InputStylesOptions = {
classes?: string | string[];
feedback?: 'error' | 'warning';
};
export declare function inputStyles({ classes, feedback }: InputStylesOptions): string;
type ComponentProps = FormControlProps & {
type?: 'text' | 'email' | 'search' | 'number' | 'password' | 'url';
};
export type InputProps = PresentationalProps & ComponentProps & JSX.InputHTMLAttributes<HTMLInputElement>;
/**
* Render a text field input
*/
export default function Input({ elementRef, type, classes, error, feedback, ...htmlAttributes }: InputProps): JSX.Element;
export {};