Commit 6eebae46 authored by bojanz's avatar bojanz

Issue #2835097 by Bcwald, bojanz: Commerce toolbar integration adds an empty link to the toolbar

parent 1292c5e4
drupal.commerce.toolbar:
toolbar:
version: VERSION
css:
theme:
......
......@@ -11,20 +11,10 @@ use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element;
/**
* Implements hook_toolbar().
* Implements hook_toolbar_alter().
*/
function commerce_toolbar() {
$items = [];
$items['commerce'] = [
'#type' => 'toolbar_item',
'#attached' => [
'library' => [
'commerce/drupal.commerce.toolbar',
],
],
];
return $items;
function commerce_toolbar_alter(&$items) {
$items['administration']['#attached']['library'][] = 'commerce/toolbar';
}
/**
......
/**
* @file
* Styling for Commerce toolbar icons.
* Commerce toolbar icon styling.
*/
/**
* Bar formatting
* Commerce includes a non-drupal cart icon called "cart.svg" that you could use instead of "drupal-cart.svg"
*/
/* Bar styling (first row), currently unused. */
.toolbar-bar .toolbar-icon-commerce-admin-commerce:before {
background-image: url("../icons/bebebe/drupal-cart.svg");
}
.toolbar-bar .toolbar-icon-commerce-admin-commerce:active:before,
.toolbar-bar .toolbar-icon-commerce-admin-commerce.active:before {
.toolbar-bar .toolbar-icon-commerce-admin-commerce:active:before {
background-image: url("../icons/ffffff/drupal-cart.svg");
}
/* Tray formatting */
.toolbar .toolbar-tray .toolbar-icon.toolbar-icon-commerce-admin-commerce:before {
/* Tray styling (second row) */
.toolbar-tray .toolbar-icon.toolbar-icon-commerce-admin-commerce:before {
background-image: url("../icons/787878/drupal-cart.svg");
}
.toolbar .toolbar-tray .toolbar-icon.toolbar-icon-commerce-admin-commerce:active:before,
.toolbar .toolbar-tray .toolbar-icon.toolbar-icon-commerce-admin-commerce.active:before {
.toolbar-tray .toolbar-icon.toolbar-icon-commerce-admin-commerce:active:before {
background-image: url("../icons/000000/drupal-cart.svg");
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment