Skip to content
This repository was archived by the owner on Sep 28, 2019. It is now read-only.

Commit b2bacdf

Browse files
committed
Update inline demo for webcomponents.org
1 parent 6b13b56 commit b2bacdf

File tree

3 files changed

+20
-48
lines changed

3 files changed

+20
-48
lines changed

README.md

+16-4
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,29 @@ Example:
2222
<custom-element-demo>
2323
<template>
2424
<link rel="import" href="iron-lazy-pages.html">
25-
<next-code-block></next-code-block>
25+
<link rel="import" href="../paper-tabs/paper-tabs.html">
26+
<link rel="import" href="../paper-tabs/paper-tab.html">
27+
<dom-bind>
28+
<template is="dom-bind">
29+
<paper-tabs selected="{{route}}" attr-for-selected='key'>
30+
<paper-tab key='foo'>Foo</paper-tab>
31+
<paper-tab key='bar'>Bar</paper-tab>
32+
<paper-tab key='baz'>Baz!</paper-tab>
33+
</paper-tabs>
34+
<next-code-block></next-code-block>
35+
</template>
36+
</dom-bind>
2637
</template>
2738
</custom-element-demo>
2839
```
2940
-->
3041
```html
3142
<iron-lazy-pages attr-for-selected="data-route" selected="{{route}}">
32-
<section data-route="foo" data-path="demo/x-foo.html">
33-
Foo page
34-
</section>
43+
<x-foo data-route="foo" data-path="demo/x-foo.html"></x-foo>
3544
<x-bar data-route="bar" data-path="demo/x-bar.html"></x-bar>
45+
<section data-route="baz">
46+
Inline element baz.
47+
</section>
3648
</iron-lazy-pages>
3749
```
3850

demo/x-bar.html

+2-22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<link rel="import" href="../../neon-animation/neon-animatable-behavior.html">
2-
<link rel="import" href="../../neon-animation/animations/slide-from-top-animation.html">
3-
<link rel="import" href="../../neon-animation/animations/slide-up-animation.html">
1+
<link rel="import" href="../../polymer/polymer.html">
42

53
<dom-module id="x-bar">
64
<template>
@@ -15,25 +13,7 @@ <h3>Bar page</h3>
1513
</template>
1614
<script>
1715
Polymer({
18-
is: 'x-bar',
19-
behaviors: [Polymer.NeonAnimationBehavior],
20-
21-
properties: {
22-
animationConfig: {
23-
value: function() {
24-
return {
25-
entry: {
26-
name: 'slide-from-top-animation',
27-
node: this
28-
},
29-
exit: {
30-
name: 'slide-up-animation',
31-
node: this
32-
}
33-
};
34-
}
35-
}
36-
}
16+
is: 'x-bar'
3717
});
3818
</script>
3919
</dom-module>

demo/x-foo.html

+2-22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<link rel="import" href="../../neon-animation/neon-animatable-behavior.html">
2-
<link rel="import" href="../../neon-animation/animations/fade-in-animation.html">
3-
<link rel="import" href="../../neon-animation/animations/fade-out-animation.html">
1+
<link rel="import" href="../../polymer/polymer.html">
42

53
<dom-module id="x-foo">
64
<template>
@@ -15,25 +13,7 @@ <h3>Foo page</h3>
1513
</template>
1614
<script>
1715
Polymer({
18-
is: 'x-foo',
19-
behaviors: [Polymer.NeonAnimationBehavior],
20-
21-
properties: {
22-
animationConfig: {
23-
value: function() {
24-
return {
25-
entry: {
26-
name: 'fade-in-animation',
27-
node: this
28-
},
29-
exit: {
30-
name: 'fade-out-animation',
31-
node: this
32-
}
33-
};
34-
}
35-
}
36-
}
16+
is: 'x-foo'
3717
});
3818
</script>
3919
</dom-module>

0 commit comments

Comments
 (0)