Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
.github/ | 03-May-2024 | - | 34 | 14 | ||
demo/ | 03-May-2024 | - | 97 | 70 | ||
test/ | 03-May-2024 | - | 276 | 213 | ||
.bower.json | D | 03-May-2024 | 1.4 KiB | 45 | 45 | |
.gitignore | D | 03-May-2024 | 17 | 2 | 1 | |
.travis.yml | D | 03-May-2024 | 784 | 25 | 24 | |
CONTRIBUTING.md | D | 03-May-2024 | 3.4 KiB | 78 | 39 | |
README.md | D | 03-May-2024 | 1.9 KiB | 73 | 36 | |
bower.json | D | 03-May-2024 | 1.1 KiB | 36 | 35 | |
hero.svg | D | 03-May-2024 | 805 | 21 | 19 | |
index.html | D | 03-May-2024 | 867 | 27 | 12 | |
paper-toast.html | D | 03-May-2024 | 9.4 KiB | 324 | 235 |
README.md
1 2<!--- 3 4This README is automatically generated from the comments in these files: 5paper-toast.html 6 7Edit those files, and our readme bot will duplicate them over here! 8Edit this file, and the bot will squash your changes :) 9 10The bot does some handling of markdown. Please file a bug if it does the wrong 11thing! https://github.com/PolymerLabs/tedium/issues 12 13--> 14 15[![Build status](https://travis-ci.org/PolymerElements/paper-toast.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-toast) 16 17_[Demo and API docs](https://elements.polymer-project.org/elements/paper-toast)_ 18 19 20##<paper-toast> 21 22Material design: [Snackbars & toasts](https://www.google.com/design/spec/components/snackbars-toasts.html) 23 24`paper-toast` provides a subtle notification toast. Only one `paper-toast` will 25be visible on screen. 26 27Use `opened` to show the toast: 28 29Example: 30 31```html 32<paper-toast text="Hello world!" opened></paper-toast> 33``` 34 35Also `open()` or `show()` can be used to show the toast: 36 37Example: 38 39```html 40<paper-button on-click="openToast">Open Toast</paper-button> 41<paper-toast id="toast" text="Hello world!"></paper-toast> 42 43... 44 45openToast: function() { 46 this.$.toast.open(); 47} 48``` 49 50Set `duration` to 0, a negative number or Infinity to persist the toast on screen: 51 52Example: 53 54```html 55<paper-toast text="Terms and conditions" opened duration="0"> 56 <a href="#">Show more</a> 57</paper-toast> 58``` 59 60### Styling 61 62The following custom properties and mixins are available for styling: 63 64| Custom property | Description | Default | 65| --- | --- | --- | 66| `--paper-toast-background-color` | The paper-toast background-color | `#323232` | 67| `--paper-toast-color` | The paper-toast color | `#f1f1f1` | 68 69This element applies the mixin `--paper-font-common-base` but does not import `paper-styles/typography.html`. 70In order to apply the `Roboto` font to this element, make sure you've imported `paper-styles/typography.html`. 71 72 73