fix incorrect type used for select attributes
This commit is contained in:
parent
6ba41f4345
commit
ca74b48be9
@ -2,7 +2,6 @@ import { SelectHTMLAttributes, forwardRef } from 'react';
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { inputClassNames } from '../input/input';
|
import { inputClassNames } from '../input/input';
|
||||||
|
|
||||||
/* eslint-disable-next-line */
|
|
||||||
export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
||||||
hasError?: boolean;
|
hasError?: boolean;
|
||||||
className?: string;
|
className?: string;
|
||||||
@ -10,8 +9,12 @@ export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
|||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Select = forwardRef<HTMLTextAreaElement, SelectProps>(
|
export const Select = forwardRef<HTMLSelectElement, SelectProps>(
|
||||||
(props, ref) => (
|
(props, ref) => (
|
||||||
<select {...props} className={classNames(inputClassNames(props), 'h-28')} />
|
<select
|
||||||
|
ref={ref}
|
||||||
|
{...props}
|
||||||
|
className={classNames(inputClassNames(props), 'h-28')}
|
||||||
|
/>
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -3,6 +3,7 @@ import { inputClassNames } from '../input/input';
|
|||||||
|
|
||||||
export interface TextAreaProps
|
export interface TextAreaProps
|
||||||
extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
||||||
|
hassError?: boolean;
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user