diff --git a/src/Symfony/Resources/views/tailwindcss_r.html.twig b/src/Symfony/Resources/views/tailwindcss_r.html.twig
new file mode 100644
index 00000000..4227a282
--- /dev/null
+++ b/src/Symfony/Resources/views/tailwindcss_r.html.twig
@@ -0,0 +1,53 @@
+{% if 'success' == envelope.type %}
+ {% set title = 'Success' %}
+ {% set text_color = 'text-green-600' %}
+ {% set ring_color = 'ring-green-300' %}
+ {% set background_color = 'bg-green-600' %}
+ {% set progress_background_color = 'bg-green-100' %}
+ {% set border_color = 'border-green-600' %}
+ {% set icon = '
' %}
+{% elseif 'error' == envelope.type %}
+ {% set title = 'Error' %}
+ {% set text_color = 'text-red-600' %}
+ {% set ring_color = 'ring-red-300' %}
+ {% set background_color = 'bg-red-600' %}
+ {% set progress_background_color = 'bg-red-100' %}
+ {% set border_color = 'border-red-600' %}
+ {% set icon = '
' %}
+{% elseif 'warning' == envelope.type %}
+ {% set title = 'Warning' %}
+ {% set text_color = 'text-yellow-600' %}
+ {% set ring_color = 'ring-yellow-300' %}
+ {% set background_color = 'bg-yellow-600' %}
+ {% set progress_background_color = 'bg-yellow-100' %}
+ {% set border_color = 'border-yellow-600' %}
+ {% set icon = '
' %}
+{% else %}
+ {% set title = 'Info' %}
+ {% set text_color = 'text-blue-600' %}
+ {% set ring_color = 'ring-blue-300' %}
+ {% set background_color = 'bg-blue-600' %}
+ {% set progress_background_color = 'bg-blue-100' %}
+ {% set border_color = 'border-blue-600' %}
+ {% set icon = '
' %}
+{% endif %}
+
+
+
+
+
+ {{ icon | raw }}
+
+
+
+ {{ title | trans }}
+
+
+ {{ envelope.message }}
+
+
+
+
+
+
+
diff --git a/src/Toastr/Prime/.phpstorm.meta.php b/src/Toastr/Prime/.phpstorm.meta.php
index 0e38b52c..7a54c0b0 100644
--- a/src/Toastr/Prime/.phpstorm.meta.php
+++ b/src/Toastr/Prime/.phpstorm.meta.php
@@ -2,8 +2,8 @@
namespace PHPSTORM_META;
-use Flasher\Toastr\Prime\ToastrBuilder;
-
-expectedArguments(ToastrBuilder::showMethod(), 1, ['fadeIn', 'slideDown', 'show']);
-expectedArguments(ToastrBuilder::showEasing(), 1, ['swing', 'linear']);
-expectedArguments(ToastrBuilder::positionClass(), 1, ['toast-top-right', 'toast-top-center', 'toast-bottom-center', 'toast-top-full-width', 'toast-bottom-full-width', 'toast-top-left', 'toast-bottom-right', 'toast-bottom-left']);
+expectedArguments(\Flasher\Toastr\Prime\ToastrBuilder::showMethod(), 0, 'fadeIn', 'fadeOut', 'slideDown', 'show');
+expectedArguments(\Flasher\Toastr\Prime\ToastrBuilder::hideMethod(), 0, 'fadeIn', 'fadeOut', 'slideDown', 'show');
+expectedArguments(\Flasher\Toastr\Prime\ToastrBuilder::showEasing(), 0, 'swing', 'linear');
+expectedArguments(\Flasher\Toastr\Prime\ToastrBuilder::hideEasing(), 0, 'swing', 'linear');
+expectedArguments(\Flasher\Toastr\Prime\ToastrBuilder::positionClass(), 0, 'toast-top-right', 'toast-top-center', 'toast-bottom-center', 'toast-top-full-width', 'toast-bottom-full-width', 'toast-top-left', 'toast-bottom-right', 'toast-bottom-left');
diff --git a/src/Toastr/Prime/ToastrBuilder.php b/src/Toastr/Prime/ToastrBuilder.php
index 5eb035b7..b02e1fad 100644
--- a/src/Toastr/Prime/ToastrBuilder.php
+++ b/src/Toastr/Prime/ToastrBuilder.php
@@ -20,6 +20,8 @@ final class ToastrBuilder extends NotificationBuilder
}
/**
+ * enable a close button
+ *
* @param bool $closeButton
*
* @return $this
@@ -68,6 +70,8 @@ final class ToastrBuilder extends NotificationBuilder
}
/**
+ * override the close button's HTML.
+ *
* @param string $closeHtml
*
* @return $this
@@ -128,6 +132,8 @@ final class ToastrBuilder extends NotificationBuilder
}
/**
+ * In case you want to escape HTML characters in title and message
+ *
* @param bool $escapeHtml
*
* @return $this
@@ -140,6 +146,8 @@ final class ToastrBuilder extends NotificationBuilder
}
/**
+ * How long the toast will display after a user hovers over it
+ *
* @param int $extendedTimeOut
*
* @return $this
@@ -212,6 +220,8 @@ final class ToastrBuilder extends NotificationBuilder
}
/**
+ * Show newest toast at bottom (top is default)
+ *
* @param bool $newestOnTop
*
* @return $this
@@ -260,6 +270,8 @@ final class ToastrBuilder extends NotificationBuilder
}
/**
+ * Rather than having identical toasts stack, set the preventDuplicates property to true. Duplicates are matched to the previous toast based on their message content.
+ *
* @param bool $preventDuplicates
*
* @return $this
@@ -272,6 +284,8 @@ final class ToastrBuilder extends NotificationBuilder
}
/**
+ * Visually indicate how long before a toast expires.
+ *
* @param bool $progressBar
*
* @return $this
@@ -296,6 +310,8 @@ final class ToastrBuilder extends NotificationBuilder
}
/**
+ * Flip the toastr to be displayed properly for right-to-left languages.
+ *
* @param bool $rtl
*
* @return $this
@@ -368,14 +384,21 @@ final class ToastrBuilder extends NotificationBuilder
}
/**
- * @param int $timeOut
+ * How long the toast will display without user interaction
+ *
+ * @param int $timeOut
+ * @param int $extendedTimeOut
*
* @return $this
*/
- public function timeOut($timeOut)
+ public function timeOut($timeOut, $extendedTimeOut = null)
{
$this->option('timeOut', $timeOut);
+ if (null !== $extendedTimeOut) {
+ $this->extendedTimeOut($extendedTimeOut);
+ }
+
return $this;
}
@@ -402,4 +425,13 @@ final class ToastrBuilder extends NotificationBuilder
return $this;
}
+
+ /**
+ * Prevent from Auto Hiding
+ */
+ public function persistent()
+ {
+ $this->timeOut(0);
+ $this->extendedTimeOut(0);
+ }
}