handsontable
Version:
Handsontable is a JavaScript Data Grid available for React, Angular and Vue.
36 lines (34 loc) • 1.15 kB
JavaScript
;
exports.__esModule = true;
exports.loadingContent = loadingContent;
var _loading = require("./loading");
/* eslint-disable max-len */
/**
* @description
* The `loadingContent` function returns a HTML string with the loading content.
*
* @param {object} options Loading content options.
* @param {string} options.id Loading id.
* @param {string} options.icon Loading icon.
* @param {string} options.title Loading title.
* @param {string} options.description Loading description.
*
* @returns {string} HTML string with the loading content.
*/
function loadingContent(_ref) {
let {
id,
icon,
title,
description
} = _ref;
return `
<div class="${_loading.LOADING_CLASS_NAME}__content">
<i class="${_loading.LOADING_CLASS_NAME}__icon">${icon}</i>
<div class="${_loading.LOADING_CLASS_NAME}__text">
<h2 id="${id}-${_loading.PLUGIN_KEY}-title" class="${_loading.LOADING_CLASS_NAME}__title">${title}</h2>
${description ? `<p id="${id}-${_loading.PLUGIN_KEY}-description" class="${_loading.LOADING_CLASS_NAME}__description">${description}</p>` : ''}
</div>
</div>
`;
}