PolymerElements/iron-demo-helpers

Name: iron-demo-helpers

Owner: PolymerElements

Description: Utility classes to make building demo pages easier

Created: 2015-11-18 22:12:13.0

Updated: 2018-05-02 00:11:50.0

Pushed: 2018-05-23 02:27:54.0

Homepage: https://elements.polymer-project.org/elements/iron-demo-helpers?view=demo:demo/index.html&active=demo-snippet

Size: 122

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build status

Demo and API docs

<demo-snippet>

demo-snippet is a helper element that displays the source of a code snippet and its rendered demo. It can be used for both native elements and Polymer elements.

ple of a native element demo

<demo-snippet>
  <template>
    <input type="date">
  </template>
</demo-snippet>

ple of a Polymer <paper-checkbox> demo

<demo-snippet>
  <template>
    <paper-checkbox>Checkbox</paper-checkbox>
    <paper-checkbox checked>Checkbox</paper-checkbox>
  </template>
</demo-snippet>
Styling

The following custom properties and mixins are available for styling:

| Custom property | Description | Default | | — | — | — | | --demo-snippet | Mixin applied to the entire element | {} | | --demo-snippet-demo | Mixin applied to just the demo section | {} | | --demo-snippet-code | Mixin applied to just the code section | {} |

<url-bar>

url-bar is a helper element that displays a simple read-only URL bar if and only if the page is in an iframe. In this way we can demo elements that deal with the URL in our iframe-based demo environments.

If the page is not in an iframe, the url-bar element is not displayed.

Styling

The following custom properties and mixins are available for styling:

| Custom property | Description | Default | | — | — | — | | --url-bar | Mixin applied to the entire element | {} |


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.