@true-engineering/true-react-common-ui-kit 3.45.0 → 3.45.1
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/README.md +6 -0
- package/dist/components/SearchInput/SearchInput.styles.d.ts +1 -1
- package/dist/true-react-common-ui-kit.js +4 -1
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +4 -1
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/SearchInput/SearchInput.styles.ts +5 -1
- package/src/components/SearchInput/SearchInput.tsx +6 -1
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { rgba } from '../../helpers';
|
|
2
|
-
import { colors,
|
|
2
|
+
import { colors, createThemedStyles, ITweakStyles } from '../../theme';
|
|
3
3
|
import { IInputStyles } from '../Input';
|
|
4
4
|
|
|
5
5
|
const LEFT_PADDING = 44;
|
|
@@ -19,6 +19,10 @@ export const useStyles = createThemedStyles('SearchInput', {
|
|
|
19
19
|
zIndex: 2,
|
|
20
20
|
color: colors.GREY_ACTIVE,
|
|
21
21
|
},
|
|
22
|
+
|
|
23
|
+
iconClickable: {
|
|
24
|
+
cursor: 'pointer',
|
|
25
|
+
},
|
|
22
26
|
});
|
|
23
27
|
|
|
24
28
|
export const inputStyles: IInputStyles = {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
2
3
|
import {
|
|
3
4
|
addClickHandler,
|
|
4
5
|
addDataAttributes,
|
|
5
6
|
getTestId,
|
|
7
|
+
isNotEmpty,
|
|
6
8
|
} from '@true-engineering/true-react-platform-helpers';
|
|
7
9
|
import { useTweakStyles } from '../../hooks';
|
|
8
10
|
import { ICommonProps } from '../../types';
|
|
@@ -47,7 +49,10 @@ export const SearchInput: FC<ISearchInputProps> = ({
|
|
|
47
49
|
|
|
48
50
|
return (
|
|
49
51
|
<div className={classes.root} {...addDataAttributes(data, testId)}>
|
|
50
|
-
<div
|
|
52
|
+
<div
|
|
53
|
+
className={clsx(classes.icon, { [classes.iconClickable]: isNotEmpty(onSearchIconClick) })}
|
|
54
|
+
{...addClickHandler(onSearchIconClick)}
|
|
55
|
+
>
|
|
51
56
|
<Icon type="search" />
|
|
52
57
|
</div>
|
|
53
58
|
<Input
|