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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kahuna-base-react-components",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "Kahuna Base React Components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -26,9 +26,9 @@ KButtonText.args = {
26
26
  height: "44px",
27
27
  hoverBackground: "yellow",
28
28
  textDecoration: "underline",
29
- activeBackground: "yellow",
30
- hoverBorder: "1px solid yellow",
31
- activeBorder: "1px solid transparent",
29
+ activeBackground: "black",
30
+ hoverBorder: "1px solid blue",
31
+ activeBorder: "1px solid red",
32
32
  };
33
33
 
34
34
  export const KButtonIcon = Template.bind({});
@@ -42,7 +42,7 @@ KInputPrimary.args = {
42
42
  placeholder: "Placeholder...",
43
43
  activeBackground: "yellow",
44
44
  hoverBorder: "1px solid yellow",
45
- activeBorder: "1px solid transparent",
45
+ activeBorder: "1px solid red",
46
46
  }
47
47
 
48
48
 
@@ -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