mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-12 19:03:47 +00:00
1849b4d39f
* chore: migrate eslint to oxlint * chore: migrate prettier to oxfmt * chore: migrate typescript * chore: toThrow should have a expected value * chore: cast test value as Day * chore: small title fix * chore: mocks should be hoisted * chore: incorrect async useage * chore: test should be inside description * chore: test sohuld include an expeced * chore: oxfmt --------- Co-authored-by: alex-Arc <omnivox@LAPTOP-RC5SNBVV.localdomain>
31 lines
763 B
TypeScript
31 lines
763 B
TypeScript
import { InputHTMLAttributes, forwardRef } from 'react';
|
|
|
|
import { cx } from '../../../utils/styleUtils';
|
|
|
|
import style from './Input.module.scss';
|
|
|
|
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
variant?: 'subtle' | 'ghosted';
|
|
height?: 'medium' | 'large';
|
|
fluid?: boolean;
|
|
}
|
|
|
|
const Input = forwardRef<HTMLInputElement, InputProps>(function Input(
|
|
{ className, variant = 'subtle', height = 'medium', fluid, ...inputProps },
|
|
ref,
|
|
) {
|
|
return (
|
|
<input
|
|
ref={ref}
|
|
type='text'
|
|
autoCorrect='off'
|
|
autoComplete='off'
|
|
spellCheck='false'
|
|
className={cx([style.input, style[variant], style[height], fluid && style.fluid, className])}
|
|
{...inputProps}
|
|
/>
|
|
);
|
|
});
|
|
|
|
export default Input;
|