
| Current Path : /var/www/html/c12park/vendor/twbs/bootstrap/site/src/components/shortcodes/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/c12park/vendor/twbs/bootstrap/site/src/components/shortcodes/JsDismiss.astro |
---
import Code from '@shortcodes/Code.astro'
interface Props {
name: string
}
const { name } = Astro.props
---
<p>
Dismissal can be achieved with the <code>data-bs-dismiss</code> attribute on a button <strong
>within the {name}</strong
> as demonstrated below:
</p>
<Code
code={`<button type="button" class="btn-close" data-bs-dismiss="${name}" aria-label="Close"></button>`}
lang="html"
/>
<p>
or on a button <strong>outside the {name}</strong> using the additional <code>data-bs-target</code> as demonstrated below:
</p>
<Code
code={`<button type="button" class="btn-close" data-bs-dismiss="${name}" data-bs-target="#my-${name}" aria-label="Close"></button>`}
lang="html"
/>