UNPKG

@amsterdam/design-system-react

Version:

All React components from the Amsterdam Design System. Use it to compose pages in your website or application.

10 lines (9 loc) 623 B
import { jsx as _jsx } from "react/jsx-runtime"; import { clsx } from 'clsx'; import { forwardRef } from 'react'; export const textInputTypes = ['email', 'tel', 'text', 'url']; /** * @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-text-input--docs Text Input docs at Amsterdam Design System} */ export const TextInput = forwardRef(({ className, dir, invalid, type = 'text', ...restProps }, ref) => (_jsx("input", { ...restProps, "aria-invalid": invalid || undefined, className: clsx('ams-text-input', className), dir: dir ?? 'auto', ref: ref, type: type }))); TextInput.displayName = 'TextInput';