Files
remark42/frontend/app/components/input/input.tsx
T

15 lines
389 B
TypeScript

import { h, JSX } from 'preact';
import clsx from 'clsx';
import styles from './input.module.css';
type Props = JSX.HTMLAttributes<HTMLInputElement> & {
invalid?: boolean;
};
export function Input({ className, type, invalid, ...props }: Props) {
return (
<input className={clsx(className, styles.input, { [styles.invalid]: invalid })} type={type ?? 'text'} {...props} />
);
}