{"version":3,"file":"Src_Scripts_components_factbox_js.ed9edb6e7ddaa6eb6908.js","sources":["webpack://haveselskabet/./Src/Scripts/components/factbox.js"],"sourcesContent":["export default class FactBox {\n constructor(elm, args) {\n const readMoreButton = elm.querySelector('.factbox-macro__read-more');\n const fadeOut = elm.querySelector('.factbox-macro__fade-out');\n const textBody = elm.querySelector('.factbox-macro__body');\n\n if (textBody.offsetHeight > 70) {\n readMoreButton.style.display = 'block';\n fadeOut.style.display = 'block';\n }\n\n readMoreButton.addEventListener('click', () => {\n textBody.style.maxHeight = 'max-content';\n readMoreButton.style.display = 'none';\n fadeOut.style.display = 'none';\n elm.classList.remove('factbox-macro--hidden')\n })\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;A;;A","sourceRoot":""}