2024-03-29 20:08:34 -04:00
|
|
|
import { TemplateOptions, Description as DescriptionType } from './types';
|
|
|
|
|
import QuestionContainer from './QuestionContainer';
|
|
|
|
|
import Title from './Title';
|
2024-09-23 15:55:37 -04:00
|
|
|
import textType from './TextType';
|
2024-03-29 20:08:34 -04:00
|
|
|
import { ParagraphStyle } from '../constants';
|
|
|
|
|
import { state } from '.';
|
|
|
|
|
|
|
|
|
|
type DescriptionOptions = TemplateOptions & DescriptionType;
|
|
|
|
|
|
|
|
|
|
export default function Description({ title, stem }: DescriptionOptions): string {
|
|
|
|
|
return `${QuestionContainer({
|
|
|
|
|
children: [
|
|
|
|
|
Title({
|
|
|
|
|
type: 'Description',
|
|
|
|
|
title: title
|
|
|
|
|
}),
|
2024-09-23 15:55:37 -04:00
|
|
|
`<p style="${ParagraphStyle(state.theme)}">${textType({
|
2024-03-29 20:08:34 -04:00
|
|
|
text: stem
|
|
|
|
|
})}</p>`
|
|
|
|
|
]
|
|
|
|
|
})}`;
|
|
|
|
|
}
|