feat: replace toasts
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
import { Controller } from '@hotwired/stimulus'
|
||||
import Toastify from 'toastify-js'
|
||||
|
||||
export default class extends Controller {
|
||||
|
||||
static values = { text: String, class: String }
|
||||
|
||||
connect() {
|
||||
Toastify({
|
||||
duration: 5000,
|
||||
text: this.textValue,
|
||||
gravity: 'top',
|
||||
position: 'right',
|
||||
className: this.classValue,
|
||||
close: true,
|
||||
}).showToast()
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,5 @@
|
||||
@import "components/forms.css";
|
||||
@import "components/button.css";
|
||||
@import "components/menu.css";
|
||||
@import "components/toast.css";
|
||||
@import "components/tooltip.css";
|
||||
@import "components/table-responsive.css";
|
||||
@@ -1,20 +0,0 @@
|
||||
@import "toastify-js/src/toastify.css";
|
||||
|
||||
.toastify {
|
||||
@apply shadow-lg rounded;
|
||||
}
|
||||
|
||||
.toastify--success {
|
||||
@apply text-gray-100;
|
||||
background: theme('colors.emerald.600');
|
||||
}
|
||||
|
||||
.toastify--warning {
|
||||
@apply text-gray-100;
|
||||
background: theme('colors.red.600');
|
||||
}
|
||||
|
||||
.toastify--info {
|
||||
@apply text-gray-100;
|
||||
background: theme('colors.blue.600');
|
||||
}
|
||||
Reference in New Issue
Block a user