Skip to content

Instantly share code, notes, and snippets.

@patrickmaciel
Created December 7, 2021 02:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickmaciel/9df4950e2791bbce57697bc69783b293 to your computer and use it in GitHub Desktop.
Save patrickmaciel/9df4950e2791bbce57697bc69783b293 to your computer and use it in GitHub Desktop.
Livewire Alpine Helpers
<!-- listen notify-saved then show a span with messages that vanish in 1000ms -->
<span x-cloak x-data="{ open: false, message: '' }" x-init="@this.on('notify-saved', () => { setTimeout(() => { open = false }, 2500); open = true;
}) " x-show='open' x-transition.out.duration.1000ms class="text-green-600">Salvo com sucesso!</span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment