adrema/resources/livewire-js/app.js

25 lines
655 B
JavaScript

import {Livewire, Alpine} from '../../vendor/livewire/livewire/dist/livewire.esm';
import Tooltip from '@ryangjchandler/alpine-tooltip';
import '../css/app.css';
import 'tippy.js/dist/tippy.css';
import 'tippy.js/animations/shift-toward.css';
import '../css/tooltip.css';
import {error, success} from './toastify.js';
import editor from './editor.js';
Alpine.plugin(
Tooltip.defaultProps({
theme: 'primary',
animation: 'shift-toward',
})
);
window.addEventListener('success', (event) => success(event.detail[0]));
document.addEventListener('alpine:init', () => {
Alpine.bind('editor', () => editor);
});
Livewire.start();