Applies all of the feedback for the new page

This commit is contained in:
Bryce
2024-04-14 22:29:01 -07:00
parent 6031f15246
commit 71b5b9864c
10 changed files with 74 additions and 53 deletions

View File

@@ -114,7 +114,7 @@
:class "dark:text-blue-500"}
"Back"])
(defn default-next-button [linear-wizard step validation-route]
(defn default-next-button [linear-wizard step validation-route & {:keys [next-button-content]}]
(let [steps (steps linear-wizard)
last? (= (step-key step) (last steps))
next-step (when-not last? (->> steps
@@ -131,9 +131,10 @@
{:from (encode-step-key (step-key step))
:to (encode-step-key (step-key next-step))})))
(if next-step
(step-name next-step)
"Save")
(or next-button-content
(if next-step
(step-name next-step)
"Save"))
(when-not last?
[:div.w-5.h-5 svg/arrow-right]))))
@@ -143,7 +144,8 @@
(defn default-step-footer [linear-wizard step & {:keys [validation-route
discard-button
next-button]}]
next-button
next-button-content]}]
[:div.flex.justify-end
[:div.flex.items-baseline.gap-x-4
(com/form-errors {:errors (:errors (:step-params fc/*form-errors*))})
@@ -157,7 +159,8 @@
next-button
validation-route
(default-next-button linear-wizard step validation-route)
(default-next-button linear-wizard step validation-route
:next-button-content next-button-content)
:else
[:div "No action possible."])]])