@bitrise/bitkit 11.2.0 → 11.2.1-alpha-chakra.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,29 +1,21 @@
|
|
|
1
|
-
import { ChangeEvent
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
2
|
import Input, { InputProps } from '../Form/Input/Input';
|
|
3
3
|
import IconButton from '../IconButton/IconButton';
|
|
4
4
|
|
|
5
5
|
export interface SearchInputProps extends Omit<InputProps, 'onChange'> {
|
|
6
|
-
onChange
|
|
6
|
+
onChange: (value: string) => void;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const SearchInput = (props: SearchInputProps) => {
|
|
10
|
-
const { onChange, ...rest } = props;
|
|
11
|
-
|
|
12
|
-
const [value, setValue] = useState('');
|
|
10
|
+
const { onChange, value, ...rest } = props;
|
|
13
11
|
|
|
14
12
|
const onInputChange = (event: ChangeEvent<HTMLInputElement>) => {
|
|
15
13
|
const q = event.target.value;
|
|
16
|
-
|
|
17
|
-
if (onChange) {
|
|
18
|
-
onChange(q);
|
|
19
|
-
}
|
|
14
|
+
onChange(q);
|
|
20
15
|
};
|
|
21
16
|
|
|
22
17
|
const onClearClick = () => {
|
|
23
|
-
|
|
24
|
-
if (onChange) {
|
|
25
|
-
onChange('');
|
|
26
|
-
}
|
|
18
|
+
onChange('');
|
|
27
19
|
};
|
|
28
20
|
|
|
29
21
|
const rightButton = (
|
package/src/index.ts
CHANGED
|
@@ -227,3 +227,6 @@ export { default as ProgressBitbot } from './Components/ProgressBitbot/ProgressB
|
|
|
227
227
|
|
|
228
228
|
export type { ProgressSpinnerProps } from './Components/ProgressSpinner/ProgressSpinner';
|
|
229
229
|
export { default as ProgressSpinner } from './Components/ProgressSpinner/ProgressSpinner';
|
|
230
|
+
|
|
231
|
+
export type { SearchInputProps } from './Components/SearchInput/SearchInput';
|
|
232
|
+
export { default as SearchInput } from './Components/SearchInput/SearchInput';
|