oddsgate-ds 1.0.217 → 1.0.219

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.
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  export interface SearchBarProps {
3
3
  value: string;
4
- onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
4
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
5
5
  placeholder?: string;
6
+ onClick?: () => void;
7
+ onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
6
8
  }
package/dist/types.d.ts CHANGED
@@ -434,8 +434,10 @@ declare const AwardBadge: ({ label, variant, }: IAwardBadge) => React__default.J
434
434
 
435
435
  interface SearchBarProps {
436
436
  value: string;
437
- onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
437
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
438
438
  placeholder?: string;
439
+ onClick?: () => void;
440
+ onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
439
441
  }
440
442
 
441
443
  declare const SearchBar: React__default.FC<SearchBarProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oddsgate-ds",
3
- "version": "1.0.217",
3
+ "version": "1.0.219",
4
4
  "description": "Miew theme component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -10,7 +10,9 @@ import { SearchBarProps } from './SearchBar.interface'
10
10
  const SearchBar: React.FC<SearchBarProps> = ({
11
11
  value,
12
12
  onChange,
13
- placeholder
13
+ placeholder,
14
+ onClick,
15
+ onKeyDown
14
16
  }) => {
15
17
  return (
16
18
  <StyledGlossarySearch>
@@ -19,8 +21,12 @@ const SearchBar: React.FC<SearchBarProps> = ({
19
21
  placeholder={placeholder}
20
22
  value={value}
21
23
  onChange={onChange}
24
+ onKeyDown={onKeyDown}
22
25
  />
23
- <SearchButton>
26
+ <SearchButton
27
+ type="button"
28
+ onClick={onClick}
29
+ >
24
30
  <Icon icon="icon-search" />
25
31
  </SearchButton>
26
32
  </StyledGlossarySearch>
@@ -1,5 +1,7 @@
1
1
  export interface SearchBarProps {
2
2
  value: string
3
- onChange: (e: React.ChangeEvent<HTMLInputElement>) => void
3
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void
4
4
  placeholder?: string
5
+ onClick?: () => void
6
+ onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void
5
7
  }