File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,9 @@ The Config file consists of two properties.
4646
4747The ` $template ` property sets the path to the View file which will be used to format your
4848alerts. The default template has HTML tags and classes designed for use with
49- [ Bootstrap 4 Alerts] ( https://getbootstrap.com/docs/4.6 /components/alerts/ ) , but the library
49+ [ Bootstrap 5 Alerts] ( https://getbootstrap.com/docs/5.2 /components/alerts/ ) , but the library
5050includes additional templates for you to choose:
51+ * ` Tatter\Alerts\Views\Bootstrap4 ` : Compatible with the Bootstrap 4 CSS Framework
5152* ` Tatter\Alerts\Views\Foundation ` : Compatible with the Foundation CSS Framework
5253* ` Tatter\Alerts\Views\Vanilla ` : A framework-free implementation, with classes available for your own CSS styling
5354
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class Alerts extends BaseConfig
99 /**
1010 * Template to use for HTML output.
1111 */
12- public string $ template = 'Tatter\Alerts\Views\Bootstrap4 ' ;
12+ public string $ template = 'Tatter\Alerts\Views\Bootstrap5 ' ;
1313
1414 /**
1515 * Mapping of Session keys to their CSS classes.
Original file line number Diff line number Diff line change 1+
2+ <?php foreach ($ alerts as $ alert ): ?>
3+ <?php [$ class , $ content ] = $ alert ; ?>
4+ <div role="alert" class="alert alert-<?= $ class ?> alert-dismissible fade show">
5+ <?= $ content ?>
6+
7+ <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
8+ </div>
9+ <?php endforeach ; ?>
You can’t perform that action at this time.
0 commit comments