mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
27 lines
979 B
TypeScript
27 lines
979 B
TypeScript
import { TemplateOptions, Essay as EssayType } from './types';
|
|
import QuestionContainer from './QuestionContainer';
|
|
import Title from './Title';
|
|
import TextType from './TextType';
|
|
import GlobalFeedback from './GlobalFeedback';
|
|
import { ParagraphStyle, TextAreaStyle } from '../constants';
|
|
import { state } from '.';
|
|
|
|
type EssayOptions = TemplateOptions & EssayType;
|
|
|
|
export default function Essay({ title, stem, globalFeedback }: EssayOptions): string {
|
|
return `${QuestionContainer({
|
|
children: [
|
|
Title({
|
|
type: 'Développement',
|
|
title: title
|
|
}),
|
|
`<p style="${ParagraphStyle(state.theme)}">${TextType({
|
|
text: stem
|
|
})}</p>`,
|
|
`<textarea class="gift-textarea" style="${TextAreaStyle(
|
|
state.theme
|
|
)}" placeholder="Entrez votre réponse ici..."></textarea>`,
|
|
GlobalFeedback({ feedback: globalFeedback })
|
|
]
|
|
})}`;
|
|
}
|