@aller/cyclops-frontend-svelte
Contains the newsletter-injection
Usage
import { injectNewsletter } from '@aller/cyclops-frontend-svelte'
const newsletter = injectNewsletter('newsletter', {
tags: string[],
site: string,
newsletterId: number,
})
Optional hiding/showing outside of the package
document.getElementById('newsletter-button')?.addEventListener('click', () => {
if (!newsletter.hidden()) {
newsletter.hide()
} else {
newsletter.show()
}
})