material_base-8.x-2.x-dev/themes/material_base_mdc/templates/form/button.html.twig
themes/material_base_mdc/templates/form/button.html.twig
{#
/**
* @file
* Theme override for an 'button' #type form element.
*
* Notice: this tempate is not defined in core yet, see
* https://www.drupal.org/project/drupal/issues/1671190
*
* Available variables:
* - attributes: A list of HTML attributes for the button element.
* - children: Optional additional rendered elements.
*
* @see template_preprocess_button()
*/
#}
{% set button_classes = [
'mdc-button',
'button-submit',
] %}
{% set attributes = attributes.setAttribute('data-mdc-auto-init', 'MDCRipple') %}
<button{{ attributes.addClass(button_classes) }}>
<div class="mdc-button__ripple"></div>
<span class="mdc-button__label">{{ attributes.value|render }}</span>
</button>{{ children }}
