From 43660387fa3df7e08a768ed95544cf5000ef0cbe Mon Sep 17 00:00:00 2001 From: mantikoros Date: Fri, 9 Sep 2022 16:08:42 -0500 Subject: [PATCH] modal positioning --- web/components/answers/answers-panel.tsx | 2 +- web/components/bet-button.tsx | 2 +- web/components/layout/modal.tsx | 16 ++++++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/web/components/answers/answers-panel.tsx b/web/components/answers/answers-panel.tsx index e53153b1..5811403f 100644 --- a/web/components/answers/answers-panel.tsx +++ b/web/components/answers/answers-panel.tsx @@ -194,7 +194,7 @@ function OpenAnswer(props: { return ( - + - + void size?: 'sm' | 'md' | 'lg' | 'xl' + position?: 'center' | 'top' | 'bottom' className?: string }) { - const { children, open, setOpen, size = 'md', className } = props + const { children, position, open, setOpen, size = 'md', className } = props const sizeClass = { sm: 'max-w-sm', @@ -19,6 +20,12 @@ export function Modal(props: { xl: 'max-w-5xl', }[size] + const positionClass = { + center: 'items-center', + top: 'items-start', + bottom: 'items-end', + }[position ?? 'bottom'] + return ( -
+