https://github.com/smerth/polymer-toggle-element
Toggle Element built with Polymer
https://github.com/smerth/polymer-toggle-element
codelab polymer
Last synced: 3 months ago
JSON representation
Toggle Element built with Polymer
- Host: GitHub
- URL: https://github.com/smerth/polymer-toggle-element
- Owner: smerth
- Created: 2016-12-21T19:46:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-03T15:41:06.000Z (over 3 years ago)
- Last Synced: 2025-03-04T22:44:42.569Z (over 1 year ago)
- Topics: codelab, polymer
- Language: HTML
- Homepage: https://smerth.github.io/polymer-toggle-element
- Size: 480 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Polymer Toggle Element
This element is meant to be included in any other element where a toggle is required. `icon-toggle.html` defines the icon toggle element. `icon-toggle-demo` imports the icon toggle and sets some configurable parameters like which icon and what message. Both elements are registered in the `elements.html`
Finally, either element is printed out in `index.html`, or another page or element...
This could be integrated with Firebase Authentication and Firebase Database to keep track of the toggle state for a peice of content or a user.
## Install
You'll need to have node.js, polymer-cli and yarn installed to begin
Install bower dependancies
```bash
polymer install
```
Install gulp to deploy to gh-pages
```bash
yarn install
```
## Develop
```bash
polymer serve
```
## Build
to build the compiled app
```bash
polymer build
```
to serve the built app
```bash
polymer serve build/default
```
## Deploy to gh-pages
Set up your codebase on github and then run
```bash
gulp deploy
```
## Reference
- [Build your first Polymer element codelab](http://www.code-labs.io/codelabs/polymer-first-elements/)
- If you're wondering what `polymer serve` does, see [Testing elements with local bower dependencies](https://www.polymer-project.org/1.0/docs/start/reusableelements.html#local-dependencies) in the Polymer docs.