Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit efbcbc0

Browse files
feat(#201): parse SVG
1 parent 3fe0c22 commit efbcbc0

File tree

8 files changed

+223
-96
lines changed

8 files changed

+223
-96
lines changed

webcomponents/lazy-img/package-lock.json

Lines changed: 58 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webcomponents/lazy-img/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
"@deckdeckgo/types": "^1.0.0-alpha.11"
2222
},
2323
"devDependencies": {
24-
"@stencil/core": "^1.0.0",
25-
"@stencil/postcss": "^0.1.0",
26-
"@stencil/sass": "^0.2.3",
24+
"@stencil/core": "^1.1.7",
25+
"@stencil/postcss": "^1.0.1",
26+
"@stencil/sass": "^1.0.1",
2727
"@stencil/utils": "0.0.5",
28-
"autoprefixer": "^9.6.0"
28+
"autoprefixer": "^9.6.1"
2929
},
3030
"repository": {
3131
"type": "git",

webcomponents/lazy-img/src/components.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { HTMLStencilElement, JSXBase } from '@stencil/core/internal';
1010

1111
export namespace Components {
1212
interface DeckgoLazyImg {
13+
'ariaLabel': string;
1314
'imgAlt': string;
1415
'imgErrorSrc': string;
1516
'imgSizes': string;
@@ -18,6 +19,7 @@ export namespace Components {
1819
'lazyLoad': () => Promise<void>;
1920
'observerRootMargin': string;
2021
'observerThreshold': number | number[];
22+
'svgSrc': string;
2123
}
2224
}
2325

@@ -36,6 +38,7 @@ declare global {
3638

3739
declare namespace LocalJSX {
3840
interface DeckgoLazyImg extends JSXBase.HTMLAttributes<HTMLDeckgoLazyImgElement> {
41+
'ariaLabel'?: string;
3942
'imgAlt'?: string;
4043
'imgErrorSrc'?: string;
4144
'imgSizes'?: string;
@@ -44,6 +47,7 @@ declare namespace LocalJSX {
4447
'observerRootMargin'?: string;
4548
'observerThreshold'?: number | number[];
4649
'onLazyImgDidLoad'?: (event: CustomEvent<any>) => void;
50+
'svgSrc'?: string;
4751
}
4852

4953
interface IntrinsicElements {

webcomponents/lazy-img/src/components/lazy-img/deckdeckgo-lazy-img.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
img {
1+
:host {
2+
fill: currentColor;
3+
}
4+
5+
img, svg {
26
pointer-events: var(--deckgo-lazy-img-pointer-events, none);
37

48
height: var(--deckgo-lazy-img-height);

0 commit comments

Comments
 (0)