Skip to content

Commit

Permalink
fixes documentation and enhances the inline demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Maffini committed Nov 13, 2016
1 parent 153e146 commit e132cb9
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 26 deletions.
50 changes: 27 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Example:
<custom-element-demo>
<template>
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../iron-icons/notification-icons.html">
<link rel="import" href="../iron-icons/av-icons.html">
<link rel="import" href="paper-tree.html">
<next-code-block></next-code-block>
</template>
Expand All @@ -20,35 +22,37 @@ Example:
-->
```html
<paper-tree data='{
"name": "GOT",
"icon": "theaters",
"name": "Media Center",
"icon": "weekend",
"open": true,
"children": [{
"name": "Starks",
"icon": "turned-in",
"name": "Movies",
"icon": "av:movie",
"children": [{
"icon": "account-circle",
"name": "Eddard"
"name": "Interstellar",
"icon": "theaters"
}, {
"name": "Catelyn",
"icon": "account-circle"
"name": "The Godfather",
"icon": "theaters"
}, {
"name": "Sansa",
"icon": "account-circle"
}, {
"name": "Robb",
"icon": "account-circle"
}, {
"name": "Bran",
"icon": "account-circle"
}, {
"name": "Arya",
"icon": "account-circle"
"name": "Pulp Fiction",
"icon": "theaters"
}]
}, {
"name": "TV Shows",
"icon": "notification:live-tv",
"children": [{
"name": "Breaking Bad",
"icon": "theaters"
}, {
"name": "Rickson",
"icon": "account-circle"
"name": "Game of Thrones",
"icon": "theaters"
}]
}]}'>
}]}'
actions='[{
"label": "Play",
"event": "play"
}]'>
</paper-tree>
```

Expand Down Expand Up @@ -83,7 +87,7 @@ See documentation to know the options and structure of the `data` attribute.

## History

* **1.0:** initial release.
* **1.0.0:** initial release.

## License

Expand Down
6 changes: 5 additions & 1 deletion paper-tree-node.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@
},

/**
* Actions available this node.
* `actions` available for this node. Each action object has the following fields:
*
* - `action.label`: string representing the display name of the menu item.
* - `action.event`: string which is the event name to dispatch whenever the item is clicked.
*
*/
actions: {
type: Array,
Expand Down
4 changes: 2 additions & 2 deletions paper-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@
},

/**
* `actions` available for all nodes.
* `actions` available for all nodes. Each action object has the following fields:
*
* - `action.label`: string representing the display name of the menu item.
* - `data.event`: string which is the event name to dispatch whenever the item is clicked.
* - `action.event`: string which is the event name to dispatch whenever the item is clicked.
*
*/
actions: {
Expand Down

0 comments on commit e132cb9

Please sign in to comment.