loading...

re: Build a Medium UI clone with Svelte, Materialize and Web Monetization API VIEW POST

FULL DISCUSSION
 

Could you also build an annoying pop ups feature? It's not really a Medium clone without that

 

I have not experienced any of this pop ups. Could you point me to a sample?

 

Thanks! To implement something like that you can use Materializecss Modals.

Something like this:

<script>
import { onMount } from "svelte";
import SvelteMonetization from 'svelte-monetization';
let modal;
onMount(() => {
    const modalElem = document.querySelector('.modal');
    modal = M.Modal.init(modalElem);

    // Show modal on load
    modal.open();
});

function handleStart() {
    modal.close();
}
</script>


<SvelteMonetization on:start={handleStart} />

<div class="modal">
<!-- Modal content -->
</div>
code of conduct - report abuse