22 lines
585 B
JavaScript
22 lines
585 B
JavaScript
import { getTextForModal } from './getTextForModal.js';
|
|
|
|
/**
|
|
* @param {
|
|
* {
|
|
* keyTitle: string,
|
|
* keyContent: string,
|
|
* currentStep: number
|
|
* }
|
|
* } data
|
|
*/
|
|
|
|
export const setModalContent = ({ keyTitle, keyContent, currentStep }) => {
|
|
const $step = document.getElementById('trainingModalCurrentStep');
|
|
const $title = document.getElementById('trainingModalTitle');
|
|
const $text = document.getElementById('trainingModalText');
|
|
|
|
$step.textContent = `${currentStep}/6`;
|
|
$title.textContent = getTextForModal(keyTitle);
|
|
$text.textContent = getTextForModal(keyContent);
|
|
};
|