Up to higher level directory | |||
Name | Date | Size | |
---|---|---|---|
.bower.json | 06-Dec-2016 | 1.4K | |
bower.json | 06-Dec-2016 | 1.1K | |
CONTRIBUTING.md | 06-Dec-2016 | 3.4K | |
demo/ | 06-Dec-2016 | ||
demo.html | 06-Dec-2016 | 2.1K | |
hero.svg | 06-Dec-2016 | 805 | |
index.html | 06-Dec-2016 | 867 | |
metadata.html | 06-Dec-2016 | 785 | |
paper-toast.css | 06-Dec-2016 | 1.9K | |
paper-toast.html | 06-Dec-2016 | 9.4K | |
README.md | 06-Dec-2016 | 1.9K | |
test/ | 06-Dec-2016 |
1 2 <!--- 3 4 This README is automatically generated from the comments in these files: 5 paper-toast.html 6 7 Edit those files, and our readme bot will duplicate them over here! 8 Edit this file, and the bot will squash your changes :) 9 10 The bot does some handling of markdown. Please file a bug if it does the wrong 11 thing! 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 22 Material design: [Snackbards & 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 25 be visible on screen. 26 27 Use `opened` to show the toast: 28 29 Example: 30 31 ```html 32 <paper-toast text="Hello world!" opened></paper-toast> 33 ``` 34 35 Also `open()` or `show()` can be used to show the toast: 36 37 Example: 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 45 openToast: function() { 46 this.$.toast.open(); 47 } 48 ``` 49 50 Set `duration` to 0, a negative number or Infinity to persist the toast on screen: 51 52 Example: 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 62 The 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 69 This element applies the mixin `--paper-font-common-base` but does not import `paper-styles/typography.html`. 70 In order to apply the `Roboto` font to this element, make sure you've imported `paper-styles/typography.html`. 71 72 73