Skip to content

Instantly share code, notes, and snippets.

@tomalec
Forked from kingflurkel/TestingJuicy
Last active August 29, 2015 14:03
Show Gist options
  • Save tomalec/d9107cc91b8bb71a93ec to your computer and use it in GitHub Desktop.
Save tomalec/d9107cc91b8bb71a93ec to your computer and use it in GitHub Desktop.
An example of `<juicy-tile-list>` wrapped inside another custom element containing `<template repeat>` and some custom-element inside
<!-- <link rel="import" href="../../../polymer/polymer.html"> -->
<link rel="import" href="../../src/juicy-tile-list.html">
<polymer-element name="custom-juicy-tile-list">
<template>
<style>
juicy-tile-list{
width: 100%;
}
custom-item {
background-color: white;
display: block;
box-shadow: 0px 0px 10px 0px rgba(50, 50, 50, 0.75);
}
</style>
<juicy-tile-list>
<template repeat="{{item in items}}">
<custom-item title="{{item.title}}" class="item">{{item.body}}</custom-item>
</template>
</juicy-tile-list>
</template>
<script>
Polymer('custom-juicy-tile-list', {
items:[
{
body: "first",
title: "a"
},
{
body: "second",
title: "b"
},
{
body: "third",
title: "c"
},
{
body: "forth",
title: "d"
}
]
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment