fix incorrect type used for select attributes

This commit is contained in:
Matthew Russell 2022-03-07 12:55:55 -08:00
parent 6ba41f4345
commit ca74b48be9
2 changed files with 7 additions and 3 deletions

View File

@ -2,7 +2,6 @@ import { SelectHTMLAttributes, forwardRef } from 'react';
import classNames from 'classnames';
import { inputClassNames } from '../input/input';
/* eslint-disable-next-line */
export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
hasError?: boolean;
className?: string;
@ -10,8 +9,12 @@ export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
children?: React.ReactNode;
}
export const Select = forwardRef<HTMLTextAreaElement, SelectProps>(
export const Select = forwardRef<HTMLSelectElement, SelectProps>(
(props, ref) => (
<select {...props} className={classNames(inputClassNames(props), 'h-28')} />
<select
ref={ref}
{...props}
className={classNames(inputClassNames(props), 'h-28')}
/>
)
);

View File

@ -3,6 +3,7 @@ import { inputClassNames } from '../input/input';
export interface TextAreaProps
extends TextareaHTMLAttributes<HTMLTextAreaElement> {
hassError?: boolean;
className?: string;
}