1
- import React from "react" ;
1
+ import { useClasser } from "@code-hike/classer"
2
+ import React from "react"
2
3
3
4
function Back ( ) {
5
+ const c = useClasser ( "ch-browser" )
4
6
return (
5
7
< svg
6
8
fill = "currentColor"
7
9
preserveAspectRatio = "xMidYMid meet"
8
10
height = "1em"
9
11
viewBox = "13 10 14 23"
10
- style = { { marginLeft : "0.2em ", marginRight : "1em" , color : "#999" } }
12
+ className = { c ( "button ", "back-button" ) }
11
13
>
12
14
< g >
13
15
< path d = "m26.5 12.1q0 0.3-0.2 0.6l-8.8 8.7 8.8 8.8q0.2 0.2 0.2 0.5t-0.2 0.5l-1.1 1.1q-0.3 0.3-0.6 0.3t-0.5-0.3l-10.4-10.4q-0.2-0.2-0.2-0.5t0.2-0.5l10.4-10.4q0.3-0.2 0.5-0.2t0.6 0.2l1.1 1.1q0.2 0.2 0.2 0.5z" />
14
16
</ g >
15
17
</ svg >
16
- ) ;
18
+ )
17
19
}
18
20
19
21
function Forward ( ) {
22
+ const c = useClasser ( "ch-browser" )
20
23
return (
21
24
< svg
22
25
fill = "currentColor"
23
26
preserveAspectRatio = "xMidYMid meet"
24
27
height = "1em"
25
28
viewBox = "13 10 14 23"
26
- style = { { marginRight : "1em ", color : "#999" } }
29
+ className = { c ( "button ", "forward-button" ) }
27
30
>
28
31
< g >
29
32
< path d = "m26.3 21.4q0 0.3-0.2 0.5l-10.4 10.4q-0.3 0.3-0.6 0.3t-0.5-0.3l-1.1-1.1q-0.2-0.2-0.2-0.5t0.2-0.5l8.8-8.8-8.8-8.7q-0.2-0.3-0.2-0.6t0.2-0.5l1.1-1.1q0.3-0.2 0.5-0.2t0.6 0.2l10.4 10.4q0.2 0.2 0.2 0.5z" />
30
33
</ g >
31
34
</ svg >
32
- ) ;
35
+ )
33
36
}
34
37
35
38
function Refresh ( ) {
@@ -43,13 +46,14 @@ function Refresh() {
43
46
>
44
47
< path d = "M29.5 10.5l3.9-3.9v11.8H21.6L27 13c-1.8-1.8-4.3-3-7-3-5.5 0-10 4.5-10 10s4.5 10 10 10c4.4 0 8.1-2.7 9.5-6.6h3.4c-1.5 5.7-6.6 10-12.9 10-7.3 0-13.3-6.1-13.3-13.4S12.7 6.6 20 6.6c3.7 0 7 1.5 9.5 3.9z" />
45
48
</ svg >
46
- ) ;
49
+ )
47
50
}
48
51
49
52
function Open ( { href } : { href : string } ) {
53
+ const c = useClasser ( "ch-browser" )
50
54
return (
51
55
< a
52
- style = { { margin : "0 1em 0 1em ", color : "inherit" } }
56
+ className = { c ( "button ", "open-button" ) }
53
57
title = "Open in new tab"
54
58
href = { href }
55
59
target = "_blank"
@@ -62,13 +66,13 @@ function Open({ href }: { href: string }) {
62
66
viewBox = "3 3 18 18"
63
67
height = "1em"
64
68
width = "1em"
65
- style = { { display : "block" } }
69
+ className = { c ( "open-icon" ) }
66
70
xmlns = "http://www.w3.org/2000/svg"
67
71
>
68
72
< path d = "M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z" > </ path >
69
73
</ svg >
70
74
</ a >
71
- ) ;
75
+ )
72
76
}
73
77
74
- export { Back , Forward , Refresh , Open } ;
78
+ export { Back , Forward , Refresh , Open }
0 commit comments