/
githubmirror
/
bootstrap
Обзор
Документация
Войти
/
githubmirror
/
bootstrap
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
site/src/components/shortcodes/JsDismiss.astro
29 строк
704 B
Julien Déramond
Docs: migration from Hugo to Astro (#41251)
15 апр 2025, 19:37
Не верифицирован
15 апр 2025, 19:37
a8ab199
Код
Авторство
О чём код?
--- 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" />