-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- <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