1
0
Fork 0
bootstrap-html/site/layouts/shortcodes/js-dismiss.html
Daniel Baumann 5403e4b85c
Merging upstream version 5.3.0+dfsg.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-08 17:48:00 +02:00

15 lines
561 B
HTML

{{- /* Usage: js-dismiss "ComponentName" */ -}}
{{- $name := .Get 0 -}}
Dismissal can be achieved with the `data-bs-dismiss` attribute on a button **within the {{ $name }}** as demonstrated below:
```html
<button type="button" class="btn-close" data-bs-dismiss="{{ $name }}" aria-label="Close"></button>
```
or on a button **outside the {{ $name }}** using the additional `data-bs-target` as demonstrated below:
```html
<button type="button" class="btn-close" data-bs-dismiss="{{ $name }}" data-bs-target="#my-{{ $name }}" aria-label="Close"></button>
```