@@ -25,16 +25,19 @@ const propTypes = {
25
25
/** Determine if the input and the button should be disabled */
26
26
disabled : PropTypes . bool ,
27
27
/** Determine the search bar size */
28
- barSize : PropTypes . string ,
28
+ size : PropTypes . string ,
29
29
}
30
30
31
31
const defaultProps = {
32
32
roundedBottom : true ,
33
- barSize : 'regular' ,
33
+ size : 'regular' ,
34
34
}
35
35
36
36
const SearchInput : React . FC < PropTypes . InferProps < typeof propTypes > &
37
- Omit < React . HTMLProps < HTMLInputElement > , 'onChange' | 'value' > > = props => {
37
+ Omit <
38
+ React . HTMLProps < HTMLInputElement > ,
39
+ 'onChange' | 'value' | 'size'
40
+ > > = props => {
38
41
const {
39
42
onClear,
40
43
onSearch,
@@ -44,7 +47,7 @@ const SearchInput: React.FC<PropTypes.InferProps<typeof propTypes> &
44
47
onFocus,
45
48
onBlur,
46
49
disabled,
47
- barSize ,
50
+ size ,
48
51
...inputProps
49
52
} = props
50
53
@@ -78,7 +81,7 @@ const SearchInput: React.FC<PropTypes.InferProps<typeof propTypes> &
78
81
79
82
const buttonClasses = classNames (
80
83
activeClass ,
81
- `bg-base br2 br--right w3 bw1 ba pa0 bl-0' h-${ barSize } ` ,
84
+ `bg-base br2 br--right w3 bw1 ba pa0 bl-0' h-${ size } ` ,
82
85
{
83
86
'c-link pointer' : ! disabled ,
84
87
'c-disabled' : disabled ,
@@ -89,7 +92,7 @@ const SearchInput: React.FC<PropTypes.InferProps<typeof propTypes> &
89
92
< div className = "flex flex-row" >
90
93
< div className = "relative w-100" >
91
94
< input
92
- className = { `${ activeClass } w-100 ma0 border-box bw1 br2 ba outline-0 c-on-base t-body ph5 pr8 br--left h-${ barSize } ` }
95
+ className = { `${ activeClass } w-100 ma0 border-box bw1 br2 ba outline-0 c-on-base t-body ph5 pr8 br--left h-${ size } ` }
93
96
value = { value }
94
97
onFocus = { handleFocus }
95
98
onBlur = { handleBlur }
0 commit comments