You are here

function claro_preprocess_links__dropbutton__operations in Drupal 8

Implements hook_preprocess_HOOK() for links__dropbutton__operations.

Operations always use the extra small dropbutton variant.

File

core/themes/claro/claro.theme, line 987
Functions to support theming in the Claro theme.

Code

function claro_preprocess_links__dropbutton__operations(&$variables) {
  $item_classes = [
    'dropbutton__item',
    'dropbutton__item--extrasmall',
  ];
  $variables['attributes']['class'][] = 'dropbutton--extrasmall';
  foreach ($variables['links'] as &$link_data) {
    $link_data['attributes']
      ->addClass($item_classes);
  }
}