bootstrap_storybook-8.x-2.0/src/components/alert/alert.twig

src/components/alert/alert.twig
{#
/**
 * @file
 * Template for Alert component.
 *
 * Available config:
 * - type: primary | secondary | success | danger | warning | info | light | dark
 * - heading: string,
 * - dimissible: true | false
 * - utility_classes: An array of utility classes.
 */
#}
{{ attach_library('bootstrap_storybook/alert') }}

{% set dismissible = dismissible ?? true %}
{% set classes = [
  'alert',
  type ? 'alert-' ~ type : 'alert-info',
  dismissible ? 'alert-dismissible',
]|merge(utility_classes ? utility_classes : []) %}

<div class="{{ classes|join(' ') }}" role="alert">
  {% if heading %}
    <h4 class="alert-heading">{{ heading }}</h4>
  {% endif %}

  {% block content %}
    {{ content }}
  {% endblock %}

  {% if dismissible %}
    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
      <span aria-hidden="true">&times;</span>
    </button>
  {% endif %}
</div>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc