import clsx from 'clsx'; import React, { CSSProperties } from 'react'; import { omit } from '../utils/mixins'; interface Style extends CSSProperties { input?: CSSProperties; label?: CSSProperties; } export type InputTypes = | 'color' | 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'tel' | 'text' | 'time' | 'url' | 'week'; export interface TextInputProps extends React.InputHTMLAttributes { className?: string; disabled?: boolean; label?: string; name?: string; style?: Style; type?: InputTypes; value?: string; } export function TextInput({ className, disabled = false, label, name, style, type = 'text', value, ...restProps }: TextInputProps) { return (
{label && ( )}
); } export default TextInput;