BREAKING: Icon definition requires a function using a tag passed via arguments:
```js
// myicon.svg.js
// before
export default '<svg>...</svg>';
// after
export default tag => tag`<svg>...</svg>`;
```
Application developers have an alternative shortcut to use in-place with lit-html:
```js
// MyComponent.js
// before
render() {
return html`
<lion-icon .svg="${'<svg>...</svg>'}"></lion-icon>
`;
}
// after
render() {
return html`
<lion-icon .svg="${html`<svg>...</svg>`}"></lion-icon>
`;
}
```
2 lines
386 B
JavaScript
2 lines
386 B
JavaScript
export default tag =>
|
|
tag`<svg focusable="false" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" data-test-id="svg-hammer"><path d="M.476 12.915L6.7 6 9 8.556l-6.223 6.915a1.542 1.542 0 0 1-1.15.529 1.54 1.54 0 0 1-1.15-.53c-.636-.706-.636-1.85 0-2.555zm12.638-9.031L16 6.863 12.866 10 4 .919 9.35 0l1.912 1.972.251-.251c.52-.52 2.4 1.363 1.88 1.882l-.279.28z"></path></svg>`;
|