1 {% extends "input--button.html.twig" %}
5 * Theme suggestion for "button__split" input form element.
8 * - attributes: A list of HTML attributes for the input element.
9 * - children: Optional additional rendered elements.
11 * - icon_only: Flag to display only the icon and not the label.
12 * - icon_position: Where an icon should be displayed.
13 * - label: button label.
14 * - prefix: Markup to display before the input element.
15 * - suffix: Markup to display after the input element.
16 * - type: The type of input.
20 * @see \Drupal\bootstrap\Plugin\Preprocess\InputButton
21 * @see \Drupal\bootstrap\Plugin\Preprocess\Input
22 * @see template_preprocess_input()
29 type == 'submit' ? 'js-form-submit',
30 icon and icon_position and not icon_only ? 'icon-' ~ icon_position,
35 <button{{ attributes.addClass(classes, 'icon-only') }}>
36 <span class="sr-only">{{ label }}</span>
40 {% if icon_position == 'after' %}
41 <button{{ attributes.addClass(classes) }}>{{ label }}{{ icon }}</button>{{ children }}
43 <button{{ attributes.addClass(classes) }}>{{ icon }}{{ label }}</button>{{ children }}
52 <button{{ split_button_attributes.addClass(classes) }} type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
53 <span class="caret"></span>
54 <span class="sr-only">{{ 'Toggle Dropdown'|t }}</span>