kahuna-base-react-components 1.2.3 → 1.2.4
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/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/KButton/KButton.stories.tsx +3 -3
- package/src/components/KInput/KInput.stories.tsx +1 -1
- package/src/components/KTextArea/KTextArea.tsx +3 -9
package/package.json
CHANGED
|
@@ -26,9 +26,9 @@ KButtonText.args = {
|
|
|
26
26
|
height: "44px",
|
|
27
27
|
hoverBackground: "yellow",
|
|
28
28
|
textDecoration: "underline",
|
|
29
|
-
activeBackground: "
|
|
30
|
-
hoverBorder: "1px solid
|
|
31
|
-
activeBorder: "1px solid
|
|
29
|
+
activeBackground: "black",
|
|
30
|
+
hoverBorder: "1px solid blue",
|
|
31
|
+
activeBorder: "1px solid red",
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export const KButtonIcon = Template.bind({});
|
|
@@ -68,7 +68,7 @@ const KTextArea: React.FC<KTextAreaProps> = (props) => {
|
|
|
68
68
|
const maxHeight = props.maxHeight || 200
|
|
69
69
|
const clearTextOnPressedEnter = props.clearTextOnPressedEnter || false
|
|
70
70
|
|
|
71
|
-
const handleInput = () => {
|
|
71
|
+
const handleInput = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
|
|
72
72
|
if (textAreaRef.current) {
|
|
73
73
|
const textarea = textAreaRef.current
|
|
74
74
|
textarea.style.height = "auto"
|
|
@@ -76,12 +76,6 @@ const KTextArea: React.FC<KTextAreaProps> = (props) => {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
useEffect(() => {
|
|
80
|
-
if (autoResize) {
|
|
81
|
-
handleInput()
|
|
82
|
-
}
|
|
83
|
-
}, [])
|
|
84
|
-
|
|
85
79
|
return (
|
|
86
80
|
<div
|
|
87
81
|
onMouseEnter={() => setHover(true)}
|
|
@@ -127,7 +121,7 @@ const KTextArea: React.FC<KTextAreaProps> = (props) => {
|
|
|
127
121
|
}}
|
|
128
122
|
onChange={(event) => {
|
|
129
123
|
if (autoResize) {
|
|
130
|
-
handleInput()
|
|
124
|
+
handleInput(event)
|
|
131
125
|
}
|
|
132
126
|
|
|
133
127
|
props.onChange(event.target.value)
|
|
@@ -169,4 +163,4 @@ const KTextArea: React.FC<KTextAreaProps> = (props) => {
|
|
|
169
163
|
)
|
|
170
164
|
}
|
|
171
165
|
|
|
172
|
-
export default KTextArea
|
|
166
|
+
export default KTextArea
|