Skip to content

Instantly share code, notes, and snippets.

View collardeau's full-sized avatar
🏠
Working from home

Thomas Collardeau collardeau

🏠
Working from home
View GitHub Profile
@collardeau
collardeau / demo.svelte
Created February 21, 2020 18:05
Svelte: RoughJS setup
<script>
import rough from "roughjs/bin/rough";
// npm i roughjs@4.0.4
// https://roughjs.com/
let roughSvg;
function action(node) {
roughSvg = rough.svg(node);
@collardeau
collardeau / demo.svelte
Last active September 8, 2023 16:59
Svelte: SweetAlert2 setup
<script>
import Swal from "sweetalert2";
// npm i sweetalert2@9.7.2
// https://sweetalert2.github.io/
</script>
<!-- a simple alert -->
<button
on:click={() => {
Swal.fire('hello sweet alert');