fuma 1.0.3 → 1.0.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/ui/form/Form.svelte
CHANGED
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
export let actionCreate = '_create'
|
|
42
42
|
export let actionDelete = '_delete'
|
|
43
43
|
export let actionUpdate = '_update'
|
|
44
|
+
export let disabled = false
|
|
44
45
|
|
|
45
46
|
/** Ignore actionCreate, actionDelete and actionUpdate */
|
|
46
47
|
export let simpleAction = false
|
|
@@ -155,12 +156,12 @@
|
|
|
155
156
|
sticky col-span-full mt-2 flex flex-row-reverse gap-2 border-t py-4 backdrop-blur-sm
|
|
156
157
|
"
|
|
157
158
|
>
|
|
158
|
-
<button class="btn btn-primary"> Valider </button>
|
|
159
|
+
<button class="btn btn-primary" {disabled}> Valider </button>
|
|
159
160
|
<div class="grow"></div>
|
|
160
161
|
{#if !simpleAction && data.id && actionDelete}
|
|
161
162
|
{@const formaction = `${action}${actionDelete}`}
|
|
162
163
|
<slot name="delete" {formaction}>
|
|
163
|
-
<ButtonDelete {formaction}>Supprimer</ButtonDelete>
|
|
164
|
+
<ButtonDelete {formaction} {disabled}>Supprimer</ButtonDelete>
|
|
164
165
|
</slot>
|
|
165
166
|
{/if}
|
|
166
167
|
</div>
|
|
@@ -15,6 +15,7 @@ declare class __sveltets_Render<Shape extends z.ZodRawShape, ReturnData extends
|
|
|
15
15
|
actionCreate?: string | undefined;
|
|
16
16
|
actionDelete?: string | undefined;
|
|
17
17
|
actionUpdate?: string | undefined;
|
|
18
|
+
disabled?: boolean | undefined;
|
|
18
19
|
/** Ignore actionCreate, actionDelete and actionUpdate */ simpleAction?: boolean | undefined;
|
|
19
20
|
options?: UseFormOptions<ReturnData> | undefined;
|
|
20
21
|
data?: Nullable<Data> | undefined;
|