File tree Expand file tree Collapse file tree 5 files changed +18914
-15443
lines changed
packages/components/src/icon Expand file tree Collapse file tree 5 files changed +18914
-15443
lines changed Original file line number Diff line number Diff line change 61
61
"selector-no-vendor-prefix" : null ,
62
62
"value-no-vendor-prefix" : null
63
63
}
64
- },
65
- "dependencies" : {
66
- "@jupyter/web-components" : " ^0.15.3"
67
64
}
68
65
}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Icon.register({
6
6
name : 'search' ,
7
7
svgStr : `
8
8
<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" />
10
10
</svg>`
11
11
} ) ;
12
12
Original file line number Diff line number Diff line change
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
+ } ) ;
Original file line number Diff line number Diff line change @@ -9,15 +9,7 @@ import {
9
9
html
10
10
} from '@microsoft/fast-element' ;
11
11
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>` ;
21
13
22
14
@customElement ( {
23
15
name : 'jp-icon' ,
@@ -36,7 +28,7 @@ export class Icon extends FASTElement {
36
28
}
37
29
38
30
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 >' ;
40
32
}
41
33
42
34
getSvg ( ) : string {
You can’t perform that action at this time.
0 commit comments