diff --git a/packages/icon/README.md b/packages/icon/README.md index fbf5cb733..c0317c210 100644 --- a/packages/icon/README.md +++ b/packages/icon/README.md @@ -23,10 +23,9 @@ import '@lion/icon/lion-icon.js'; ### Example ```js -import 'lion-icon/lion-icon.js'; -import bugSvg from './somewhere'; +import './somewhere/my-iconset.js'; ``` ```html - + ``` diff --git a/packages/icon/stories/icon.stories.mdx b/packages/icon/stories/icon.stories.mdx index 2eba24da7..7bb4b85e6 100644 --- a/packages/icon/stories/icon.stories.mdx +++ b/packages/icon/stories/icon.stories.mdx @@ -1,5 +1,8 @@ import { Story, Meta, html } from '@open-wc/demoing-storybook'; -import { bug24 } from './icons/iconset-bugs.js'; +import './icons/iconset-bugs.js'; +import './icons/iconset-misc.js'; +import * as spaceSet from './icons/iconset-space.js'; + import '../lion-icon.js'; import './icon-resolvers.js'; @@ -37,14 +40,39 @@ npm i --save @lion/icon import '@lion/icon/lion-icon.js'; ``` -### Displaying icons +### Icon sets Icons are displayed using icon sets. These are collections of icons, lazily loaded on demand for performance. See the system documentation to learn more about icon sets. - + {html` - + ${Object.keys(spaceSet).map( + name => html` + +
+ + ${name} +
+ ` + )} `}
@@ -75,30 +103,30 @@ A `lion-icon` without an `aria-label` attribute will be automatically given an ` By default, a `lion-icon` will be `1em` × `1em` (the current line-height). -`lion-icon` uses SVGs and may be styled with CSS, including using CSS properties such as `fill` and `stroke`: +`lion-icon` uses SVGs and may be styled with CSS, including using CSS properties such as `fill`: {html` - + `} ```html - + ``` See SVG and CSS on MDN web docs for more information.