diff --git a/daily-thought-frontend/src/components/questions/QuestionList.tsx b/daily-thought-frontend/src/components/questions/QuestionList.tsx new file mode 100644 index 0000000000000000000000000000000000000000..6c74c962f759c4ae0e9fd0dbf51e8da148e21701 --- /dev/null +++ b/daily-thought-frontend/src/components/questions/QuestionList.tsx @@ -0,0 +1,26 @@ +import { FC } from 'react'; +import { QuestionRecord } from '@/hooks/useQuestions'; +import { TrashIcon } from '@heroicons/react/24/outline'; + +type QuestionListProps = { + questions: QuestionRecord[]; +}; + +const QuestionList: FC<QuestionListProps> = ({ questions }) => ( + <ul + role="list" + className="flex flex-col min-h-min max-w-lg overflow-y-scroll divide-y divide-gray-100 " + > + {questions.map((question: QuestionRecord) => ( + <li + key={question.id} + className="flex flex-row items-center justify-between gap-x-6 py-5 px-4 " + > + <p className="text-base font-semibold leading-6 text-gray-900">{question.content}</p> + <TrashIcon className="shrink-0 h-6 w-6" /> + </li> + ))} + </ul> +); + +export default QuestionList;