@bitrise/bitkit 10.31.1 → 10.31.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
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
InputLeftElement,
|
|
13
13
|
InputRightAddon,
|
|
14
14
|
InputRightElement,
|
|
15
|
+
SystemStyleObject,
|
|
15
16
|
} from '@chakra-ui/react';
|
|
16
17
|
import Icon, { TypeIconName } from '../../Icon/Icon';
|
|
17
18
|
|
|
@@ -105,11 +106,16 @@ const Input = forwardRef<InputProps, 'div'>((props, ref) => {
|
|
|
105
106
|
value,
|
|
106
107
|
};
|
|
107
108
|
|
|
108
|
-
|
|
109
|
+
let InputWrapper: any = Fragment;
|
|
110
|
+
const inputWrapperProps: SystemStyleObject = {};
|
|
111
|
+
if (leftIconName || rightAddon || rightIconName) {
|
|
112
|
+
InputWrapper = InputGroup;
|
|
113
|
+
inputWrapperProps.zIndex = 0;
|
|
114
|
+
}
|
|
109
115
|
return (
|
|
110
116
|
<FormControl {...formControlProps}>
|
|
111
117
|
{label && <FormLabel>{label}</FormLabel>}
|
|
112
|
-
<InputWrapper>
|
|
118
|
+
<InputWrapper {...inputWrapperProps}>
|
|
113
119
|
{leftIconName && (
|
|
114
120
|
<InputLeftElement margin="12px" pointerEvents="none">
|
|
115
121
|
<Icon name={leftIconName} />
|