function claro_preprocess_links__dropbutton__operations

Implements hook_preprocess_HOOK() for links__dropbutton__operations.

Operations always use the extra small dropbutton variant.

File

core/themes/claro/claro.theme, line 987

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);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.