mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-31 22:24:59 +08:00
ui: add more props to Select
This commit is contained in:
@ -7,7 +7,7 @@ import type {
|
||||
} from 'react';
|
||||
import React, { forwardRef, useId } from 'react';
|
||||
|
||||
type TextInputInputAttributes = Pick<
|
||||
type Attributes = Pick<
|
||||
InputHTMLAttributes<HTMLInputElement>,
|
||||
| 'autoComplete'
|
||||
| 'disabled'
|
||||
@ -16,17 +16,14 @@ type TextInputInputAttributes = Pick<
|
||||
| 'min'
|
||||
| 'minLength'
|
||||
| 'name'
|
||||
| 'onBlur'
|
||||
| 'onFocus'
|
||||
| 'pattern'
|
||||
| 'placeholder'
|
||||
| 'required'
|
||||
| 'type'
|
||||
>;
|
||||
|
||||
type TextInputDOMAttributes = Pick<
|
||||
InputHTMLAttributes<HTMLInputElement>,
|
||||
'onBlur' | 'onFocus'
|
||||
>;
|
||||
|
||||
type Props = Readonly<{
|
||||
defaultValue?: string;
|
||||
endIcon?: React.ComponentType<React.ComponentProps<'svg'>>;
|
||||
@ -39,8 +36,7 @@ type Props = Readonly<{
|
||||
startIcon?: React.ComponentType<React.ComponentProps<'svg'>>;
|
||||
value?: string;
|
||||
}> &
|
||||
Readonly<TextInputDOMAttributes> &
|
||||
Readonly<TextInputInputAttributes>;
|
||||
Readonly<Attributes>;
|
||||
|
||||
type State = 'error' | 'normal';
|
||||
|
||||
|
Reference in New Issue
Block a user