Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6745)

Unified Diff: chrome/browser/resources/md_bookmarks/toast_manager.html

Issue 2898303004: [MD Bookmarks] Add toasts. (Closed)
Patch Set: fix nits Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_bookmarks/toast_manager.html
diff --git a/chrome/browser/resources/md_bookmarks/toast_manager.html b/chrome/browser/resources/md_bookmarks/toast_manager.html
new file mode 100644
index 0000000000000000000000000000000000000000..bc3a64323de9f2c69a361ce951c804f34d2e0b96
--- /dev/null
+++ b/chrome/browser/resources/md_bookmarks/toast_manager.html
@@ -0,0 +1,60 @@
+<link rel="import" href="chrome://resources/html/polymer.html">
+
+<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
+<link rel="import" href="chrome://bookmarks/shared_style.html">
+
+<dom-module id="bookmarks-toast-manager">
+ <template>
+ <style include="shared-style">
+ #content {
+ flex: 1;
+ margin-right: 32px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ paper-button {
+ color: var(--google-blue-300);
+ font-weight: 500;
+ height: 32px;
+ margin: 0;
+ min-width: 52px;
+ padding: 8px;
+ }
+
+ #toast {
+ align-items: center;
+ background-color: #323232;
+ border-radius: 4px;
+ bottom: 0;
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.28);
+ box-sizing: border-box;
+ color: #fff;
+ display: flex;
+ margin: 24px;
+ max-width: 568px;
+ min-height: 52px;
+ min-width: 288px;
+ opacity: 0;
+ padding: 0 24px;
+ position: fixed;
+ transform: translateY(100px);
+ transition: transform 300ms, opacity 300ms;
+ white-space: nowrap;
+ }
+
+ :host([open_]) #toast {
+ opacity: 1;
+ transform: translateY(0);
+ }
+ </style>
+ <div id="toast" aria-live="polite">
+ <div id="content"></div>
+ <paper-button id="button" hidden$="[[!showUndo_]]" on-tap="onUndoTap_">
+ $i18n{undo}
+ </paper-button>
+ </div>
+ </template>
+ <script src="chrome://bookmarks/toast_manager.js"></script>
+</dom-module>
« no previous file with comments | « chrome/browser/resources/md_bookmarks/compiled_resources2.gyp ('k') | chrome/browser/resources/md_bookmarks/toast_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698