diff --git a/js/toast.js b/js/toast.js index 74575fd..e8befb2 100644 --- a/js/toast.js +++ b/js/toast.js @@ -1,7 +1,7 @@ /** * @author Script47 (https://github.com/Script47/Toast) * @description Toast - A Bootstrap 4.2+ jQuery plugin for the toast component - * @version 0.7.1 + * @version 0.8.0 **/ (function ($) { var TOAST_CONTAINER_HTML = '
'; @@ -36,6 +36,7 @@ type = opts.type || 'info', delay = opts.delay || -1, img = opts.img, + ico = opts.ico, pause_on_hover = opts.pause_on_hover || false, pause = false, delay_or_autohide = ''; @@ -70,6 +71,48 @@ fg_subtitle_class = 'text-white'; fg_dismiss_class = 'text-white'; break; + + case 'dark': + bg_header_class = 'bg-dark'; + fg_header_class = 'text-white'; + fg_subtitle_class = 'text-white'; + fg_dismiss_class = 'text-white'; + break; + + case 'primary': + bg_header_class = 'bg-primary'; + fg_header_class = 'text-white'; + fg_subtitle_class = 'text-white'; + fg_dismiss_class = 'text-white'; + break; + + case 'secondary': + bg_header_class = 'bg-secondary'; + fg_header_class = 'text-white'; + fg_subtitle_class = 'text-white'; + fg_dismiss_class = 'text-white'; + break; + + case 'light': + bg_header_class = 'bg-light'; + fg_header_class = ''; + fg_subtitle_class = ''; + fg_dismiss_class = ''; + break; + + case 'white': + bg_header_class = 'bg-white'; + fg_header_class = 'text-dark'; + fg_subtitle_class = 'text-dark'; + fg_dismiss_class = 'text-dark'; + break; + + case 'transparent': + bg_header_class = 'bg-transparent'; + fg_header_class = ''; + fg_subtitle_class = ''; + fg_dismiss_class = ''; + break; } if (pause_on_hover !== false) { @@ -88,11 +131,15 @@ html = '