blob: 989db07d3c1f7a2ca97044590b04b02ebd86cb1a [file] [log] [blame]
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_icon_button/cr_icon_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar.html">
<link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar_selection_overlay.html">
<link rel="import" href="chrome://resources/cr_elements/icons.html">
<link rel="import" href="shared_style.html">
<link rel="import" href="strings.html">
<dom-module id="bookmarks-toolbar">
<template>
<style include="shared-style">
:host {
position: relative;
}
cr-toolbar {
flex: 1;
--cr-toolbar-field-margin:
calc(var(--sidebar-width) + var(--splitter-width));
}
cr-icon-button {
justify-content: flex-end;
margin: 4px;
}
:host-context(html:not([dark])) cr-icon-button {
--cr-icon-button-color: currentColor;
}
:host(:not([narrow_])) cr-toolbar-selection-overlay {
--selection-overlay-padding: var(--card-padding-side);
--cr-toolbar-field-margin: var(--sidebar-width);
--selection-overlay-max-width: var(--card-max-width);
}
</style>
<cr-toolbar page-name="$i18n{title}"
has-overlay$="[[showSelectionOverlay]]"
clear-label="$i18n{clearSearch}"
search-prompt="$i18n{searchPrompt}"
narrow="{{narrow_}}"
on-search-changed="onSearchChanged_">
<cr-icon-button iron-icon="cr:more-vert"
id="menuButton"
title="$i18n{organizeButtonTitle}"
on-click="onMenuButtonOpenTap_"
aria-haspopup="menu"></cr-icon-button>
</cr-toolbar>
<cr-toolbar-selection-overlay show="[[showSelectionOverlay]]"
delete-label="$i18n{delete}"
cancel-label="$i18n{cancel}"
selection-label="[[getItemsSelectedString_(selectedItems_.size)]]"
delete-disabled="[[!canDeleteSelection_(selectedItems_)]]"
on-delete-selected-items="onDeleteSelectionTap_"
on-clear-selected-items="onClearSelectionTap_">
</cr-toolbar-selection-overlay>
</template>
<script src="toolbar.js"></script>
</dom-module>