Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit bc213f3

Browse files
author
Arthur Evans
committed
Update core-icon API docs
Related to #19.
1 parent 4c91899 commit bc213f3

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

core-icon.html

+22-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-->
99
<!--
1010
11-
The `core-icon` element displays an icon. By default an icon renders as 24px square.
11+
The `core-icon` element displays an icon. By default an icon renders as a 24px square.
1212
1313
Example using src:
1414
@@ -25,18 +25,35 @@
2525
}
2626
</style>
2727
28-
Example using icon from default iconset:
28+
The core elements include several sets of icons.
29+
To use the default set of icons, import `core-icons.html` and use the `icon` attribute to specify an icon:
30+
31+
Example of using an icon from the default iconset:
32+
33+
&lt;!-- import default iconset and core-icon --&gt;
34+
<link rel="import" href="/components/core-icons/core-icons.html">
2935
3036
<core-icon icon="menu"></core-icon>
37+
38+
To use a different built-in set of icons, import `core-icons/<iconset>-icons.html`, and
39+
specify the icon as `<iconset>:<icon>`. For example:
40+
41+
&lt;!-- import communication iconset and core-icon --&gt;
42+
<link rel="import" href="/components/core-icons/communication-icons.html">
43+
44+
<core-icon icon="communication:email"></core-icon>
45+
46+
You can also create custom icon sets of bitmap or SVG icons.
47+
3148
32-
Example using icon `cherry` from custom iconset `fruit`:
49+
Example of using an icon named `cherry` from a custom iconset with the ID `fruit`:
3350
3451
<core-icon icon="fruit:cherry"></core-icon>
3552
3653
See [core-iconset](#core-iconset) and [core-iconset-svg](#core-iconset-svg) for more information about
37-
how to use a custom iconset.
54+
how to create a custom iconset.
3855
39-
See [core-icons](http://www.polymer-project.org/components/core-icons/demo.html) for the default set of icons. To use the default set of icons you'll need to include an import for `core-icons.html`. To use a different built-in set of icons, you'll need to include an import for `core-icons/iconsets/<iconset>.html`.
56+
See [core-icons](http://www.polymer-project.org/components/core-icons/demo.html) for the default set of icons.
4057
4158
@group Polymer Core Elements
4259
@element core-icon

0 commit comments

Comments
 (0)