kahuna-base-react-components 0.1.8 → 0.1.10

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/types.d.ts CHANGED
@@ -52,6 +52,7 @@ declare const KLogo: React.FC<KLogoProps>;
52
52
  interface KInputProps {
53
53
  value: string;
54
54
  onChange: (value: string) => void;
55
+ onBlur?: (value: string) => void;
55
56
  width?: number;
56
57
  height?: number;
57
58
  leftIcon?: string;
@@ -59,6 +60,7 @@ interface KInputProps {
59
60
  background?: string;
60
61
  activeBackground?: string;
61
62
  borderRadius?: number;
63
+ disabled?: boolean;
62
64
  placeholder?: string;
63
65
  shadowDisabled?: boolean;
64
66
  type?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kahuna-base-react-components",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "Kahuna Base React Components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -4,6 +4,7 @@ import "../../main.css"
4
4
  export interface KInputProps {
5
5
  value: string
6
6
  onChange: (value: string) => void
7
+ onBlur?: (value: string) => void
7
8
  width?: number
8
9
  height?: number
9
10
  leftIcon?: string
@@ -11,6 +12,7 @@ export interface KInputProps {
11
12
  background?: string
12
13
  activeBackground?: string
13
14
  borderRadius?: number
15
+ disabled?: boolean
14
16
  placeholder?: string
15
17
  shadowDisabled?: boolean
16
18
  type?: string
@@ -36,6 +38,7 @@ const KInput: React.FC<KInputProps> = (props) => {
36
38
  const boxShadow = props.shadowDisabled ? "" : "0 0 0 1px rgba(17, 17, 17, 0.04), 0 1px 1px 0 rgba(17, 17, 17, 0.04)"
37
39
  const type = props.type || "text"
38
40
  const accentColor = props.accentColor || ""
41
+ const disabled = props.disabled || false
39
42
 
40
43
  return (
41
44
  <div className={"k-input-container"} style={{background, borderRadius, boxShadow}}>
@@ -51,6 +54,10 @@ const KInput: React.FC<KInputProps> = (props) => {
51
54
  style={{background, width, height, accentColor}}
52
55
  value={props.value}
53
56
  placeholder={props.placeholder || ""}
57
+ disabled={disabled}
58
+ onBlur={(event) => {
59
+ if (props.onBlur) props.onBlur(event.target.value)
60
+ }}
54
61
  onChange={(event) => {
55
62
  props.onChange(event.target.value)
56
63
  }}/>