@true-engineering/true-react-common-ui-kit 4.0.0-alpha17 → 4.0.0-alpha18

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@true-engineering/true-react-common-ui-kit",
3
- "version": "4.0.0-alpha17",
3
+ "version": "4.0.0-alpha18",
4
4
  "description": "True Engineering React UI Kit with theming support",
5
5
  "author": "True Engineering (https://trueengineering.ru)",
6
6
  "keywords": [
@@ -4,7 +4,7 @@ import { addDataAttributes } from '../../helpers';
4
4
  import { useTweakStyles } from '../../hooks';
5
5
  import { ICommonProps } from '../../types';
6
6
  import { Button } from '../Button';
7
- import { Icon } from '../Icon';
7
+ import { IIcon, renderIcon } from '../Icon';
8
8
  import { FilterWrapper, IFiltersPaneSearchProps, FiltersPaneSearch } from './components';
9
9
  import { getLocale } from './helpers';
10
10
  import { ConfigType, IFilterLocaleKey, IPartialFilterLocale } from './types';
@@ -25,6 +25,8 @@ export interface IFiltersPaneProps<Values extends Record<string, unknown>, Conte
25
25
  hasClearButton?: boolean;
26
26
  /** @default false */
27
27
  shouldRenderDataId?: boolean;
28
+ /** @default 'filter' */
29
+ settingsIcon?: IIcon;
28
30
  onChangeFilters: (values: Partial<Values>) => void;
29
31
  onSettingsButtonClick?: () => void;
30
32
  onClear?: () => void;
@@ -42,6 +44,7 @@ export function FiltersPane<Values extends Record<string, unknown>, Content = Va
42
44
  isDisabled = false,
43
45
  hasClearButton = true,
44
46
  shouldRenderDataId = false,
47
+ settingsIcon = 'filter',
45
48
  testId,
46
49
  onChangeFilters,
47
50
  onSettingsButtonClick,
@@ -107,9 +110,7 @@ export function FiltersPane<Values extends Record<string, unknown>, Content = Va
107
110
  {...addDataTestId(testId, 'settings-button')}
108
111
  onClick={!isDisabled ? onSettingsButtonClick : undefined}
109
112
  >
110
- <div className={classes.settingsIcon}>
111
- <Icon type="filter" />
112
- </div>
113
+ <div className={classes.settingsIcon}>{renderIcon(settingsIcon)}</div>
113
114
  </div>
114
115
  )}
115
116
  {/* Search */}