@solidpb/ui-kit 0.6.2 → 0.6.3

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 CHANGED
@@ -1,4 +1,4 @@
1
- ## UI components for solidpb
1
+ ## UI components for solidjs, based on daisyui and kobalte
2
2
 
3
3
  Need to add below to vite.config.ts:
4
4
 
@@ -1,4 +1,4 @@
1
- import { JSXElement, Setter } from "solid-js";
1
+ import { JSXElement } from "solid-js";
2
2
  import { type SwitchProps } from "./Switch";
3
3
  import { type SelectProps } from "./Select";
4
4
  import { type InputRootProps } from "./Input";
@@ -11,7 +11,7 @@ import { type FileInputProps } from "./FileInput";
11
11
  import { RelationPickerProps } from "./RelationPicker";
12
12
  export interface FormProps<T> {
13
13
  data: Partial<T>;
14
- setData: Setter<Partial<T>>;
14
+ setData: (data: Partial<T>) => void;
15
15
  title?: string;
16
16
  onSave?: (values: Partial<T>) => Promise<void>;
17
17
  onCancel?: () => void;
@@ -18,7 +18,7 @@ const formClass = tv({
18
18
  export function createForm() {
19
19
  const Form = (props) => {
20
20
  const setValue = (key, value) => {
21
- props.setData((prev) => ({ ...prev, [key]: value }));
21
+ props.setData({ ...props.data, [key]: value });
22
22
  };
23
23
  const getValue = (key) => {
24
24
  return props.data[key];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidpb/ui-kit",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",