Skip to content
Snippets Groups Projects
Commit c52a44cc authored by Felipe D'Abrantes's avatar Felipe D'Abrantes
Browse files

Add Question List component

parent f4528ab3
No related branches found
No related tags found
1 merge request!25Add a question management page
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;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment