@moda/om 19.7.2 → 19.8.0

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.
@@ -6,5 +6,6 @@ export type SearchInputProps = TextInputProps & {
6
6
  onClear?(): void;
7
7
  roundBorders?: boolean;
8
8
  noBorders?: boolean;
9
+ searchIconSize?: number;
9
10
  };
10
11
  export declare const SearchInput: React.FC<SearchInputProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moda/om",
3
- "version": "19.7.2",
3
+ "version": "19.8.0",
4
4
  "description": "Moda Operandi design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -73,7 +73,7 @@
73
73
  "@commitlint/config-conventional": "^19.1.0",
74
74
  "@moda/rollup-plugin-postcss": "^4.0.1",
75
75
  "@rollup/plugin-babel": "^6.0.4",
76
- "@rollup/plugin-commonjs": "^26.0.1",
76
+ "@rollup/plugin-commonjs": "^28.0.0",
77
77
  "@rollup/plugin-node-resolve": "^15.2.3",
78
78
  "@storybook/addon-actions": "^8.0.1",
79
79
  "@storybook/addon-essentials": "^8.0.1",
@@ -4,13 +4,17 @@ import ExitIcon from '@moda/icons/exit-20';
4
4
  import SearchIcon from '@moda/icons/search-20';
5
5
  import { TextInput, TextInputProps } from '../TextInput';
6
6
  import { Clickable } from '../Clickable';
7
+
7
8
  import './SearchInput.scss';
8
9
 
10
+ const SEARCH_ICON_DEFAULT_SIZE = 20;
11
+
9
12
  export type SearchInputProps = TextInputProps & {
10
13
  value?: string;
11
14
  onClear?(): void;
12
15
  roundBorders?: boolean;
13
16
  noBorders?: boolean;
17
+ searchIconSize?: number;
14
18
  };
15
19
 
16
20
  const DEFAULT_INPUT_VALUE = '';
@@ -22,6 +26,7 @@ export const SearchInput: React.FC<SearchInputProps> = ({
22
26
  roundBorders = false,
23
27
  noBorders = false,
24
28
  value = DEFAULT_INPUT_VALUE,
29
+ searchIconSize = SEARCH_ICON_DEFAULT_SIZE,
25
30
  ...rest
26
31
  }) => {
27
32
  const ref = useRef<HTMLInputElement>(null);
@@ -48,7 +53,7 @@ export const SearchInput: React.FC<SearchInputProps> = ({
48
53
  return (
49
54
  <div className={classNames('SearchInput', className)}>
50
55
  <div className='SearchInput__icon'>
51
- <SearchIcon />
56
+ <SearchIcon height={`${searchIconSize}px`} width={`${searchIconSize}px`} />
52
57
  </div>
53
58
 
54
59
  <TextInput