Commit graph

7 commits

Author SHA1 Message Date
Marcos Gil
4ff7a1e846 fix(icon): render nothing consistently when svg is null 2019-09-16 19:51:01 +02:00
Mikhail Bashkirov
a6b0780d4f feat(icon): enforce icon security using tagged templates
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>
  `;
}
```
2019-07-01 17:48:05 +02:00
Mikhail Bashkirov
0ef6a7c49f chore(icon): don't use id on svg in tests to not confuse users 2019-07-01 17:44:30 +02:00
Mikhail Bashkirov
ba69c52ff1 chore(icon): add tests for race conditions with promises 2019-06-27 18:18:52 +02:00
Mikhail Bashkirov
c62d3353a2 fix(icon): render nothing consistently when svg is undefined 2019-06-27 18:18:52 +02:00
Thomas Allmer
8d96f84090 fix: update storybook/linting; adjust story labels, eslint ignores 2019-04-28 15:02:31 +02:00
Thomas Allmer
ec8da8f12c feat: release inital public lion version
Co-authored-by: Mikhail Bashkirov <mikhail.bashkirov@ing.com>
Co-authored-by: Thijs Louisse <thijs.louisse@ing.com>
Co-authored-by: Joren Broekema <joren.broekema@ing.com>
Co-authored-by: Gerjan van Geest <gerjan.van.geest@ing.com>
Co-authored-by: Erik Kroes <erik.kroes@ing.com>
Co-authored-by: Lars den Bakker <lars.den.bakker@ing.com>
2019-04-26 10:37:57 +02:00