From 3ccada8d8f57f25c2402f53946a4dbd7fb834c02 Mon Sep 17 00:00:00 2001 From: Adriano Caloiaro Date: Wed, 19 Feb 2025 12:21:02 -0700 Subject: [PATCH] feat: alternative styling for single choice questions --- static/css/styles.css | 8 +-- .../FieldLogicTriggerAction_enumer_4274367401 | 0 ui/fields/single_choice.templ | 9 ++-- ui/fields/single_choice_templ.go | 54 +++++++++---------- ui/fields/single_choice_templ.txt | 6 +-- 5 files changed, 40 insertions(+), 37 deletions(-) create mode 100644 types/FieldLogicTriggerAction_enumer_4274367401 diff --git a/static/css/styles.css b/static/css/styles.css index 4c03a45..61ca335 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -2680,6 +2680,10 @@ input.tab:checked + .tab-content, flex-grow: 1; } +.grow { + flex-grow: 1; +} + .cursor-move { cursor: move; } @@ -2767,10 +2771,6 @@ input.tab:checked + .tab-content, place-self: center; } -.justify-self-end { - justify-self: end; -} - .overflow-visible { overflow: visible; } diff --git a/types/FieldLogicTriggerAction_enumer_4274367401 b/types/FieldLogicTriggerAction_enumer_4274367401 new file mode 100644 index 0000000..e69de29 diff --git a/ui/fields/single_choice.templ b/ui/fields/single_choice.templ index e3ea246..10be9bf 100644 --- a/ui/fields/single_choice.templ +++ b/ui/fields/single_choice.templ @@ -50,7 +50,11 @@ templ SingleChoiceSpaced(field types.FormField) {
for _, option := range field.Options { - ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -310,7 +310,7 @@ func SingleChoiceSpaced(field types.FormField) templ.Component { var templ_7745c5c3_Var16 string templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("errors-%s", field.ID.String())) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/fields/single_choice.templ`, Line: 74, Col: 50} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/fields/single_choice.templ`, Line: 77, Col: 50} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16)) if templ_7745c5c3_Err != nil { diff --git a/ui/fields/single_choice_templ.txt b/ui/fields/single_choice_templ.txt index b4ec001..616593f 100644 --- a/ui/fields/single_choice_templ.txt +++ b/ui/fields/single_choice_templ.txt @@ -16,13 +16,13 @@
- +\">
\ No newline at end of file