app-toast
A swipeable, actionable, and themable paper-toast.
Installation
bower install --save app-toast
Usage
- Drop
app-toast
in and call theshow()
method. - Use app-toasts for preset themes.
Demo
<app-toast id="toast"></app-toast>
<select id="icon">
<option>No icon</option>
<option selected>check-circle</option>
<option>check</option>
<option>check-box</option>
<option>info</option>
<option>info-outline</option>
<option>warning</option>
<option>error</option>
<option>error-outline</option>
</select><br/>
<input id="text" placeholder="text" value="text"/><br/>
<input id="duration" placeholder="duration (ms)" value="3000"/><br/>
<input id="actionText" placeholder="action button text" value="action"/><br/>
<label><input id="showCancel" type="checkbox"/>Show cancel</label><br/>
<label><input id="disableSwipe" type="checkbox"/>Disable swipe</label><br/>
<label><input id="fitBottom" type="checkbox"/>Fit to bottom</label><br/>
<button onclick="showToast()">Show</button>
<button onclick="toast.close()">Close</button><br/>
Last Event: <span id="feedback"></span>
Full demo: webcomponents.org | github.
API: webcomponents.org | github.
Contributing
- Fork it on Github.
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request