f-i18n-paper
Version:
paper-elements extensions, using f-i18n for text like labels
59 lines (49 loc) • 2.28 kB
HTML
<html>
<head>
<title>f-i18n-input demo</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="../../@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
<script type="module" src="../../@polymer/iron-demo-helpers/demo-pages-shared-styles.js"></script>
<script type="module" src="../../@polymer/iron-demo-helpers/demo-snippet.js"></script>
<script type="module" src="../../f-i18n/f-i18n-domain.js"></script>
<script type="module" src="../f-i18n-input.js"></script>
<script type="module" src="../f-i18n-toast.js"></script>
<!-- FIXME(polymer-modulizer):
These imperative modules that innerHTML your HTML are
a hacky way to be sure that any mixins in included style
modules are ready before any elements that reference them are
instantiated, otherwise the CSS @apply mixin polyfill won't be
able to expand the underlying CSS custom properties.
See: https://github.com/Polymer/polymer-modulizer/issues/154
-->
<script type="module">
const $_documentContainer = document.createElement('template');
$_documentContainer.innerHTML = `<style is="custom-style" include="demo-pages-shared-styles">
</style>`;
document.head.appendChild($_documentContainer.content);
</script>
</head>
<body>
<script type="module">
const $_documentContainer = document.createElement('template');
$_documentContainer.innerHTML = `<div class="vertical-section-container centered">
<h3>Basic f-i18n-input Demo</h3>
<demo-snippet>
<template>
<dom-bind>
<template>
<f-i18n-domain domain="test" messages-url="lang" locale="en"></f-i18n-domain>
<f-i18n-input required="" m-label="test.label" m-error-message="test.error-message" auto-validate="" value="{{value}}"></f-i18n-input>
<p>Value: [[value]]</p>
<f-i18n-toast required="" m="test.toast" opened="" duration="1000000"></f-i18n-toast>
</template>
</dom-bind>
</template>
</demo-snippet>
</div>`;
document.body.appendChild($_documentContainer.content);
</script>
</body>
</html>