Skip to content

Commit dab9928

Browse files
committed
updated changes
1 parent 16f0faf commit dab9928

File tree

5 files changed

+18914
-15443
lines changed

5 files changed

+18914
-15443
lines changed

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,5 @@
6161
"selector-no-vendor-prefix": null,
6262
"value-no-vendor-prefix": null
6363
}
64-
},
65-
"dependencies": {
66-
"@jupyter/web-components": "^0.15.3"
6764
}
6865
}

packages/components/src/icon/icon.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Icon.register({
66
name: 'search',
77
svgStr: `
88
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
9-
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
9+
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" fill="currentColor"/>
1010
</svg>`
1111
});
1212

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) Jupyter Development Team.
2+
// Distributed under the terms of the Modified BSD License.
3+
4+
import { test, expect } from '@playwright/test';
5+
6+
test('Default', async ({ page }) => {
7+
await page.goto('/iframe.html?id=components-icon--default');
8+
9+
expect(await page.locator('jp-icon').screenshot()).toMatchSnapshot(
10+
'icon-default.png'
11+
);
12+
});

packages/components/src/icon/index.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,7 @@ import {
99
html
1010
} from '@microsoft/fast-element';
1111

12-
const template = html<Icon>`
13-
<svg
14-
xmlns="http://www.w3.org/2000/svg"
15-
width="24"
16-
height="24"
17-
viewBox="0 0 24 24"
18-
innerHTML="${x => x.getSvg()}"
19-
></svg>
20-
`;
12+
const template = html<Icon>`<div :innerHTML="${x => x.getSvg()}"></div>`;
2113

2214
@customElement({
2315
name: 'jp-icon',
@@ -36,7 +28,7 @@ export class Icon extends FASTElement {
3628
}
3729

3830
static defaultIcon(): string {
39-
return '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"/>';
31+
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z" fill="currentColor"/></svg>';
4032
}
4133

4234
getSvg(): string {

0 commit comments

Comments
 (0)