Filters
Category
Brand
Price Range
Best Selling Products
- item.id === nextId);
if(existingIndex !== -1){
toasts.splice(existingIndex, 1);
}
toasts.unshift({
id: nextId,
show: false,
message: event.detail.message,
description: event.detail.description,
type: event.detail.type,
html: event.detail.html,
duration: Number(event.detail.duration || 4000),
persistent: !!event.detail.persistent
});
"
@mouseenter="toastsHovered=true;"
@mouseleave="toastsHovered=false"
x-init="
if(layout == 'expanded'){
expanded = true;
}
stackToasts();
$watch('toastsHovered', function(value){
if(layout == 'default'){
if(position.includes('bottom')){
resetBottom();
} else {
resetTop();
}
if(value){
// calculate the new positions
expanded = true;
if(layout == 'default'){
stackToasts();
}
} else {
if(layout == 'default'){
expanded = false;
setTimeout(function(){
stackToasts();
}, 10)
}
}
}
});
"
class="fixed block w-full group z-99 sm:max-w-xs"
:class="{ 'right-0 top-0 sm:mt-6 sm:mr-6': position=='top-right', 'left-0 top-0 sm:mt-6 sm:ml-6': position=='top-left', 'left-1/2 -translate-x-1/2 top-0 sm:mt-6': position=='top-center', 'right-0 bottom-0 sm:mr-6 sm:mb-6': position=='bottom-right', 'left-0 bottom-0 sm:ml-6 sm:mb-6': position=='bottom-left', 'left-1/2 -translate-x-1/2 bottom-0 sm:mb-6': position=='bottom-center' }"
x-cloak>
-