Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.

Commit 1f536b7

Browse files
committed
feat(fab): Add new tests for svg/img
1 parent 676ae32 commit 1f536b7

File tree

3 files changed

+56
-1
lines changed

3 files changed

+56
-1
lines changed

test/screenshot/fab/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ body {
1414

1515
.demo-fill-color {
1616
@include mdc-fab-container-color(orange);
17-
}
17+
}

test/screenshot/fab/standard.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ ReactDOM.render((
1616
<Fab className="demo-button">
1717
<a className="material-icons">add</a>
1818
</Fab>
19+
<Fab className="demo-button">
20+
<svg xmlns="http://www.w3.org/2000/svg" className="material-icons" viewBox="0 0 24 24" fill="#000000">
21+
<path fill="none" d="M0 0h24v24H0z"/>
22+
<path d="M23 12c0-6.07-4.93-11-11-11S1 5.93 1 12s4.93 11 11 11 11-4.93 11-11zM5 17.64C3.75 16.1 3 14.14 3 12c0-2.13.76-4.08 2-5.63v11.27zM17.64 5H6.36C7.9 3.75 9.86 3 12 3s4.1.75 5.64 2zM12 14.53L8.24 7h7.53L12 14.53zM17 9v8h-4l4-8zm-6 8H7V9l4 8zm6.64 2c-1.55 1.25-3.51 2-5.64 2s-4.1-.75-5.64-2h11.28zM21 12c0 2.14-.75 4.1-2 5.64V6.37c1.24 1.55 2 3.5 2 5.63z"/>
23+
</svg>
24+
</Fab>
25+
<Fab className="demo-button">
26+
<img className="material-icons" src="/images/ic_button_24px.svg"/>
27+
</Fab>
1928
<Fab mini className="demo-button">
2029
<i className="material-icons">favorite</i>
2130
</Fab>
@@ -25,6 +34,15 @@ ReactDOM.render((
2534
<Fab mini className="demo-button">
2635
<a className="material-icons">add</a>
2736
</Fab>
37+
<Fab mini className="demo-button">
38+
<svg xmlns="http://www.w3.org/2000/svg" className="material-icons" viewBox="0 0 24 24" fill="#000000">
39+
<path fill="none" d="M0 0h24v24H0z"/>
40+
<path d="M23 12c0-6.07-4.93-11-11-11S1 5.93 1 12s4.93 11 11 11 11-4.93 11-11zM5 17.64C3.75 16.1 3 14.14 3 12c0-2.13.76-4.08 2-5.63v11.27zM17.64 5H6.36C7.9 3.75 9.86 3 12 3s4.1.75 5.64 2zM12 14.53L8.24 7h7.53L12 14.53zM17 9v8h-4l4-8zm-6 8H7V9l4 8zm6.64 2c-1.55 1.25-3.51 2-5.64 2s-4.1-.75-5.64-2h11.28zM21 12c0 2.14-.75 4.1-2 5.64V6.37c1.24 1.55 2 3.5 2 5.63z"/>
41+
</svg>
42+
</Fab>
43+
<Fab mini className="demo-button">
44+
<img className="material-icons" src="/images/ic_button_24px.svg"/>
45+
</Fab>
2846
<Fab className="demo-ink-color demo-button">
2947
<i className="material-icons">favorite</i>
3048
</Fab>
@@ -34,6 +52,15 @@ ReactDOM.render((
3452
<Fab className="demo-ink-color demo-button">
3553
<a className="material-icons">add</a>
3654
</Fab>
55+
<Fab className="demo-ink-color demo-button">
56+
<svg xmlns="http://www.w3.org/2000/svg" className="material-icons" viewBox="0 0 24 24" fill="#000000">
57+
<path fill="none" d="M0 0h24v24H0z"/>
58+
<path d="M23 12c0-6.07-4.93-11-11-11S1 5.93 1 12s4.93 11 11 11 11-4.93 11-11zM5 17.64C3.75 16.1 3 14.14 3 12c0-2.13.76-4.08 2-5.63v11.27zM17.64 5H6.36C7.9 3.75 9.86 3 12 3s4.1.75 5.64 2zM12 14.53L8.24 7h7.53L12 14.53zM17 9v8h-4l4-8zm-6 8H7V9l4 8zm6.64 2c-1.55 1.25-3.51 2-5.64 2s-4.1-.75-5.64-2h11.28zM21 12c0 2.14-.75 4.1-2 5.64V6.37c1.24 1.55 2 3.5 2 5.63z"/>
59+
</svg>
60+
</Fab>
61+
<Fab className="demo-ink-color demo-button">
62+
<img className="material-icons" src="/images/ic_button_24px.svg"/>
63+
</Fab>
3764
<Fab mini className="demo-ink-color demo-button">
3865
<i className="material-icons">favorite</i>
3966
</Fab>
@@ -43,6 +70,15 @@ ReactDOM.render((
4370
<Fab mini className="demo-ink-color demo-button">
4471
<a className="material-icons">add</a>
4572
</Fab>
73+
<Fab mini className="demo-ink-color demo-button">
74+
<svg xmlns="http://www.w3.org/2000/svg" className="material-icons" viewBox="0 0 24 24" fill="#000000">
75+
<path fill="none" d="M0 0h24v24H0z"/>
76+
<path d="M23 12c0-6.07-4.93-11-11-11S1 5.93 1 12s4.93 11 11 11 11-4.93 11-11zM5 17.64C3.75 16.1 3 14.14 3 12c0-2.13.76-4.08 2-5.63v11.27zM17.64 5H6.36C7.9 3.75 9.86 3 12 3s4.1.75 5.64 2zM12 14.53L8.24 7h7.53L12 14.53zM17 9v8h-4l4-8zm-6 8H7V9l4 8zm6.64 2c-1.55 1.25-3.51 2-5.64 2s-4.1-.75-5.64-2h11.28zM21 12c0 2.14-.75 4.1-2 5.64V6.37c1.24 1.55 2 3.5 2 5.63z"/>
77+
</svg>
78+
</Fab>
79+
<Fab mini className="demo-ink-color demo-button">
80+
<img className="material-icons" src="/images/ic_button_24px.svg"/>
81+
</Fab>
4682
<Fab className="demo-fill-color demo-button">
4783
<i className="material-icons">favorite</i>
4884
</Fab>
@@ -52,6 +88,15 @@ ReactDOM.render((
5288
<Fab className="demo-fill-color demo-button">
5389
<a className="material-icons">add</a>
5490
</Fab>
91+
<Fab className="demo-fill-color demo-button">
92+
<svg xmlns="http://www.w3.org/2000/svg" className="material-icons" viewBox="0 0 24 24" fill="#000000">
93+
<path fill="none" d="M0 0h24v24H0z"/>
94+
<path d="M23 12c0-6.07-4.93-11-11-11S1 5.93 1 12s4.93 11 11 11 11-4.93 11-11zM5 17.64C3.75 16.1 3 14.14 3 12c0-2.13.76-4.08 2-5.63v11.27zM17.64 5H6.36C7.9 3.75 9.86 3 12 3s4.1.75 5.64 2zM12 14.53L8.24 7h7.53L12 14.53zM17 9v8h-4l4-8zm-6 8H7V9l4 8zm6.64 2c-1.55 1.25-3.51 2-5.64 2s-4.1-.75-5.64-2h11.28zM21 12c0 2.14-.75 4.1-2 5.64V6.37c1.24 1.55 2 3.5 2 5.63z"/>
95+
</svg>
96+
</Fab>
97+
<Fab className="demo-fill-color demo-button">
98+
<img className="material-icons" src="/images/ic_button_24px.svg"/>
99+
</Fab>
55100
<Fab mini className="demo-fill-color demo-button">
56101
<i className="material-icons">favorite</i>
57102
</Fab>
@@ -61,5 +106,14 @@ ReactDOM.render((
61106
<Fab mini className="demo-fill-color demo-button">
62107
<a className="material-icons">add</a>
63108
</Fab>
109+
<Fab mini className="demo-fill-color demo-button">
110+
<svg xmlns="http://www.w3.org/2000/svg" className="material-icons" viewBox="0 0 24 24" fill="#000000">
111+
<path fill="none" d="M0 0h24v24H0z"/>
112+
<path d="M23 12c0-6.07-4.93-11-11-11S1 5.93 1 12s4.93 11 11 11 11-4.93 11-11zM5 17.64C3.75 16.1 3 14.14 3 12c0-2.13.76-4.08 2-5.63v11.27zM17.64 5H6.36C7.9 3.75 9.86 3 12 3s4.1.75 5.64 2zM12 14.53L8.24 7h7.53L12 14.53zM17 9v8h-4l4-8zm-6 8H7V9l4 8zm6.64 2c-1.55 1.25-3.51 2-5.64 2s-4.1-.75-5.64-2h11.28zM21 12c0 2.14-.75 4.1-2 5.64V6.37c1.24 1.55 2 3.5 2 5.63z"/>
113+
</svg>
114+
</Fab>
115+
<Fab mini className="demo-fill-color demo-button">
116+
<img className="material-icons" src="/images/ic_button_24px.svg"/>
117+
</Fab>
64118
</div>
65119
), document.getElementById('app'));
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)