diff --git a/apps/portal/src/components/questions/ContributeQuestionCard.tsx b/apps/portal/src/components/questions/ContributeQuestionCard.tsx index 4237febb..16643e0c 100644 --- a/apps/portal/src/components/questions/ContributeQuestionCard.tsx +++ b/apps/portal/src/components/questions/ContributeQuestionCard.tsx @@ -1,4 +1,5 @@ import type { ComponentProps, ForwardedRef } from 'react'; +import { useState } from 'react'; import { forwardRef } from 'react'; import type { UseFormRegisterReturn } from 'react-hook-form'; import { useForm } from 'react-hook-form'; @@ -9,6 +10,8 @@ import { } from '@heroicons/react/24/outline'; import { Button, TextInput } from '@tih/ui'; +import ContributeQuestionModal from './ContributeQuestionModal'; + export type ContributeQuestionData = { company: string; date: Date; @@ -45,44 +48,56 @@ export default function ContributeQuestionCard({ onSubmit, }: ContributeQuestionCardProps) { const { register, handleSubmit } = useForm(); + const [isOpen, setOpen] = useState(false); return ( -
- -
-
- -
-
- + + +
+
+ +
+
+ +
+
+ +
+
-
- -
-
- + + + + ); } diff --git a/apps/portal/src/components/questions/ContributeQuestionModal.tsx b/apps/portal/src/components/questions/ContributeQuestionModal.tsx new file mode 100644 index 00000000..e7597bb8 --- /dev/null +++ b/apps/portal/src/components/questions/ContributeQuestionModal.tsx @@ -0,0 +1,96 @@ +import type { Dispatch, SetStateAction } from 'react'; +import { Fragment, useState } from 'react'; +import { Dialog, Transition } from '@headlessui/react'; + +import Checkbox from './ui-patch/Checkbox'; + +export type ContributeQuestionModalProps = { + contributeState: boolean; + setContributeState: Dispatch>; +}; + +export default function ContributeQuestionModal({ + contributeState, + setContributeState, +}: ContributeQuestionModalProps) { + const [canSubmit, setCanSubmit] = useState(false); + + const handleCheckSimilarQuestions = (checked: boolean) => { + setCanSubmit(checked); + }; + + return ( + + setContributeState(false)}> + +
+ + +
+
+ + +
+
+
+ + Question Draft + +
+

+ Question Contribution form +

+
+
+
+
+
+
+ +
+
+ + +
+
+
+
+
+
+
+
+ ); +}