diff --git a/web/components/confirmation-modal.tsx b/web/components/confirmation-modal.tsx new file mode 100644 index 00000000..2d6eefa2 --- /dev/null +++ b/web/components/confirmation-modal.tsx @@ -0,0 +1,52 @@ +import clsx from 'clsx' + +export function ConfirmationModal(props: { + id: string + openModelBtn: { + label: string + className?: string + } + cancelBtn?: { + label?: string + className?: string + } + submitBtn?: { + label?: string + className?: string + } + onSubmit: () => void + children: any +}) { + const { id, openModelBtn, cancelBtn, submitBtn, onSubmit, children } = props + + return ( + <> + + + +
+
+ {children} + +
+ + +
+
+
+ + ) +} diff --git a/web/components/resolution-panel.tsx b/web/components/resolution-panel.tsx index 2e5f59ad..fd612caf 100644 --- a/web/components/resolution-panel.tsx +++ b/web/components/resolution-panel.tsx @@ -7,6 +7,7 @@ import { Title } from './title' import { User } from '../lib/firebase/users' import { YesNoCancelSelector } from './yes-no-selector' import { Spacer } from './layout/spacer' +import { ConfirmationModal } from './confirmation-modal' export function ResolutionPanel(props: { creator: User @@ -17,8 +18,6 @@ export function ResolutionPanel(props: { const [outcome, setOutcome] = useState<'YES' | 'NO' | 'CANCEL' | undefined>() - const resolveDisabled = false - function resolve() { console.log('resolved', outcome) } @@ -70,34 +69,23 @@ export function ResolutionPanel(props: { - - - -
-
-

Are you sure you want to resolve this market?

-
- - -
-
-
+

Are you sure you want to resolve this market?

+ ) }