Spacer.js 420 B

12345678910111213141516171819
  1. /**
  2. * @typedef {Object} SpacerProps
  3. * @property {string} space
  4. */
  5. /**
  6. * An empty element to add spacing manually.
  7. * @param {Document} document
  8. * @param {HTMLElement} root
  9. * @param {SpacerProps} props
  10. * @returns {void}
  11. */
  12. function Spacer(document, root, props) {
  13. const spacer = document.createElement('div');
  14. spacer.style.paddingBottom = props.space;
  15. root.appendChild(spacer);
  16. }
  17. module.exports = Spacer;