From cfd6af7c72f5d2e9dcfa4337a956a1af5e3dc289 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Sat, 4 Jun 2022 21:28:27 -0500 Subject: [PATCH] Tweak create page layout --- web/components/choices-toggle-group.tsx | 58 +++++----- web/pages/create.tsx | 143 +++++++++++------------- 2 files changed, 92 insertions(+), 109 deletions(-) diff --git a/web/components/choices-toggle-group.tsx b/web/components/choices-toggle-group.tsx index 0120aea9..d467cb15 100644 --- a/web/components/choices-toggle-group.tsx +++ b/web/components/choices-toggle-group.tsx @@ -20,37 +20,31 @@ export function ChoicesToggleGroup(props: { children, } = props return ( - - null} - className="mt-2" - > -
- {Object.keys(choicesMap).map((choiceKey) => ( - setChoice(choicesMap[choiceKey])} - className={({ active }) => - clsx( - active ? 'ring-2 ring-indigo-500 ring-offset-2' : '', - currentChoice === choicesMap[choiceKey] - ? 'border-transparent bg-indigo-500 text-white hover:bg-indigo-600' - : 'border-gray-200 bg-white text-gray-900 hover:bg-gray-50', - 'flex cursor-pointer items-center justify-center rounded-md border py-3 px-3 text-sm font-medium normal-case', - "hover:ring-offset-2' hover:ring-2 hover:ring-indigo-500", - className - ) - } - disabled={isSubmitting} - > - {choiceKey} - - ))} - {children} -
-
-
+ null}> + + {Object.keys(choicesMap).map((choiceKey) => ( + setChoice(choicesMap[choiceKey])} + className={({ active }) => + clsx( + active ? 'ring-2 ring-indigo-500 ring-offset-2' : '', + currentChoice === choicesMap[choiceKey] + ? 'border-transparent bg-indigo-500 text-white hover:bg-indigo-600' + : 'border-gray-200 bg-white text-gray-900 hover:bg-gray-50', + 'flex cursor-pointer items-center justify-center rounded-md border py-3 px-3 text-sm font-medium normal-case', + "hover:ring-offset-2' hover:ring-2 hover:ring-indigo-500", + className + ) + } + disabled={isSubmitting} + > + {choiceKey} + + ))} + {children} + + ) } diff --git a/web/pages/create.tsx b/web/pages/create.tsx index e8d28083..78abfa10 100644 --- a/web/pages/create.tsx +++ b/web/pages/create.tsx @@ -28,7 +28,7 @@ export default function Create() { return (
-
+
+
@@ -168,8 +169,8 @@ export function NewContract(props: { question: string; tag?: string }) { return (
-