mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-03-28 17:42:40 +01:00
22 lines
575 B
TypeScript
22 lines
575 B
TypeScript
import * as React from 'react';
|
|
import { Answer } from './Answer';
|
|
|
|
export interface IQuestionAnswerProps {
|
|
question: string;
|
|
answer: string;
|
|
answerId: number;
|
|
sources: string[];
|
|
}
|
|
|
|
export const QuestionAnswer: React.FunctionComponent<IQuestionAnswerProps> = ({ question, answer, answerId, sources }: React.PropsWithChildren<IQuestionAnswerProps>) => {
|
|
return (
|
|
<ul className={`mt-4 space-y-4 px-4`}>
|
|
<li className='question'>{question}</li>
|
|
|
|
<Answer
|
|
answer={answer}
|
|
answerId={answerId}
|
|
sources={sources} />
|
|
</ul>
|
|
);
|
|
}; |