File tree Expand file tree Collapse file tree 3 files changed +68
-45
lines changed Expand file tree Collapse file tree 3 files changed +68
-45
lines changed Original file line number Diff line number Diff line change
1
+ import React from "react" ;
2
+
3
+ const CopyIcon = ( ) => {
4
+ return (
5
+ < >
6
+ { /* svg from https://ionic.io/ionicons */ }
7
+ < svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 512 512" >
8
+ < rect
9
+ x = "128"
10
+ y = "128"
11
+ width = "336"
12
+ height = "336"
13
+ rx = "57"
14
+ ry = "57"
15
+ fill = "none"
16
+ stroke = "currentColor"
17
+ strokeLinejoin = "round"
18
+ strokeWidth = "32"
19
+ />
20
+ < path
21
+ d = "M383.5 128l.5-24a56.16 56.16 0 00-56-56H112a64.19 64.19 0 00-64 64v216a56.16 56.16 0 0056 56h24"
22
+ fill = "none"
23
+ stroke = "currentColor"
24
+ strokeLinecap = "round"
25
+ strokeLinejoin = "round"
26
+ strokeWidth = "32"
27
+ />
28
+ </ svg >
29
+ </ >
30
+ ) ;
31
+ } ;
32
+
33
+ export default CopyIcon ;
Original file line number Diff line number Diff line change
1
+ import React from "react" ;
2
+
3
+ const PasteIcon = ( ) => {
4
+ return (
5
+ < >
6
+ { /* svg from https://ionic.io/ionicons */ }
7
+ < svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 512 512" >
8
+ < path
9
+ d = "M336 64h32a48 48 0 0148 48v320a48 48 0 01-48 48H144a48 48 0 01-48-48V112a48 48 0 0148-48h32"
10
+ fill = "none"
11
+ stroke = "currentColor"
12
+ strokeLinejoin = "round"
13
+ strokeWidth = "32"
14
+ />
15
+ < rect
16
+ x = "176"
17
+ y = "32"
18
+ width = "160"
19
+ height = "64"
20
+ rx = "26.13"
21
+ ry = "26.13"
22
+ fill = "none"
23
+ stroke = "currentColor"
24
+ strokeLinejoin = "round"
25
+ strokeWidth = "32"
26
+ />
27
+ </ svg >
28
+ </ >
29
+ ) ;
30
+ } ;
31
+ export default PasteIcon ;
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import { useCallback } from "react";
3
3
import { useEffect } from "react" ;
4
4
import { useDispatch , useSelector } from "react-redux" ;
5
5
import { setStateFromClipboard , State } from "../../reducer" ;
6
+ import PasteIcon from "../../assets/icons/PasteIcon" ;
7
+ import CopyIcon from "../../assets/icons/CopyIcon" ;
6
8
7
9
const CopyPasteSelection = ( ) => {
8
10
console . log ( "CopyPasteSelection" ) ;
@@ -85,57 +87,14 @@ const CopyPasteSelection = () => {
85
87
onClick = { copy }
86
88
aria-label = "Copy selected frameworks and benchmarks"
87
89
>
88
- { /* svg from https://ionic.io/ionicons */ }
89
- < svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 512 512" >
90
- < rect
91
- x = "128"
92
- y = "128"
93
- width = "336"
94
- height = "336"
95
- rx = "57"
96
- ry = "57"
97
- fill = "none"
98
- stroke = "currentColor"
99
- strokeLinejoin = "round"
100
- strokeWidth = "32"
101
- />
102
- < path
103
- d = "M383.5 128l.5-24a56.16 56.16 0 00-56-56H112a64.19 64.19 0 00-64 64v216a56.16 56.16 0 0056 56h24"
104
- fill = "none"
105
- stroke = "currentColor"
106
- strokeLinecap = "round"
107
- strokeLinejoin = "round"
108
- strokeWidth = "32"
109
- />
110
- </ svg >
90
+ < CopyIcon > </ CopyIcon >
111
91
</ button >
112
92
< button
113
93
className = "iconbutton"
114
94
onClick = { handlePasteFromClipboard }
115
95
aria-label = "Paste selected items (or use ctrl/cmd + v for firefox)"
116
96
>
117
- { /* svg from https://ionic.io/ionicons */ }
118
- < svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 512 512" >
119
- < path
120
- d = "M336 64h32a48 48 0 0148 48v320a48 48 0 01-48 48H144a48 48 0 01-48-48V112a48 48 0 0148-48h32"
121
- fill = "none"
122
- stroke = "currentColor"
123
- strokeLinejoin = "round"
124
- strokeWidth = "32"
125
- />
126
- < rect
127
- x = "176"
128
- y = "32"
129
- width = "160"
130
- height = "64"
131
- rx = "26.13"
132
- ry = "26.13"
133
- fill = "none"
134
- stroke = "currentColor"
135
- strokeLinejoin = "round"
136
- strokeWidth = "32"
137
- />
138
- </ svg >
97
+ < PasteIcon > </ PasteIcon >
139
98
</ button >
140
99
</ >
141
100
) ;
You can’t perform that action at this time.
0 commit comments