@kahitsan/ksui 0.41.0 → 0.41.1

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": "@kahitsan/ksui",
3
- "version": "0.41.0",
3
+ "version": "0.41.1",
4
4
  "description": "ksui is a standalone set of SolidJS UI components for KahitSan/Hilinga and any SolidJS app. Published to the public npm registry and consumed as a normal dependency. Ships source under a `solid` export condition so the consumer's vite-plugin-solid compiles it with only solid-js externalized; it depends on nothing but solid-js + lucide-solid and injects its own CSS.",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -48,7 +48,8 @@ export interface FormActionsProps {
48
48
  }
49
49
 
50
50
  export default function FormActions(props: FormActionsProps): JSX.Element {
51
- const isSubmitType = () => props.submitType === "submit";
51
+ const submitType = props.submitType ?? "button";
52
+ const submitHandler = submitType === "submit" ? undefined : props.onSubmit;
52
53
  return (
53
54
  <div
54
55
  class={
@@ -65,8 +66,8 @@ export default function FormActions(props: FormActionsProps): JSX.Element {
65
66
  {props.cancelLabel ?? "Cancel"}
66
67
  </Button>
67
68
  <Button
68
- type={isSubmitType() ? "submit" : "button"}
69
- onClick={isSubmitType() ? undefined : props.onSubmit}
69
+ type={submitType}
70
+ onClick={submitHandler}
70
71
  disabled={(props.submitting ?? false) || (props.submitDisabled ?? false)}
71
72
  intent={props.danger ? "danger" : "primary"}
72
73
  class="gap-2 w-full sm:w-auto"