PolymerElements / iron-iconset-svg

Represents a source of icons expressed as a collection of inline SVGs
https://www.webcomponents.org/element/PolymerElements/iron-iconset-svg
37 stars 34 forks source link

I'm finding the Readme and docs incomprehensible. Had to look at demo to understand #68

Open akc42 opened 7 years ago

akc42 commented 7 years ago

This element seems so different from others that its taken a while to figure out, yet the Readme (or the Overview on webcomponents.org) doesn't really give any clue as to how to use it. The main issue is that you don't actually use <iron-iconset-svg> in your custom element template.

The demo on the other hand does show an approach to making and using a custom icon set that is useful. If the readme contained something like the following as instructions for use:-

1) Create an html file (called, lets say my-iconset.html) with <iron-iconset-svg name="my-iconset-name"> ..."desired svg icons" ... </iron-iconset-svg> as its contents, You will need to to import bower-components/iron-iconset/iron-iconset.html and as an optionally convenience also import bower_components/iron-icon/iron-icon.html as it avoids the user of these icons from having to do so. 2) In a custom element that wants to use one of these icons then html import my-iconset.html and then in the template of the custom element insert <iron-icon icon="my-iconset-name:iconname"></iron-icon>