File tree Expand file tree Collapse file tree 4 files changed +79
-53
lines changed Expand file tree Collapse file tree 4 files changed +79
-53
lines changed Original file line number Diff line number Diff line change
1
+ import { cx } from 'emotion' ;
1
2
import React from 'react' ;
2
3
import style from './Button.module.css' ;
3
4
4
5
export const Button = ( props ) => {
5
- const { children, ...rest } = props ;
6
+ const { children, className , ...rest } = props ;
6
7
return (
7
- < button className = { style . button } { ...rest } >
8
+ < button className = { cx ( style . button , className ) } { ...rest } >
8
9
{ children }
9
10
</ button >
10
11
) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import { css } from 'emotion' ;
1
2
import React from 'react' ;
2
- import style from './Header.module.css' ;
3
3
4
4
export const Header = ( ) => {
5
+ const styles = {
6
+ rootContainer : css `
7
+ align-items : center;
8
+ background : # 333 ;
9
+ color : white;
10
+ display : flex;
11
+ font-size : 1.5rem ;
12
+ height : 48px ;
13
+ padding-left : 1rem ;
14
+ ` ,
15
+ icon : css `
16
+ width : 32px ;
17
+ margin-right : 0.5rem ;
18
+ ` ,
19
+ title : css `
20
+ flex : 1 ;
21
+ font-size : 1.5rem ;
22
+ ` ,
23
+ coffeeImgContainer : css `
24
+ border-radius : 5px ;
25
+ display : inline-flex;
26
+ margin-right : 1rem ;
27
+ overflow : hidden;
28
+ @media (max-width : 700px ) {
29
+ display : none;
30
+ }
31
+ ` ,
32
+ coffeeImg : css `
33
+ width : 130px ;
34
+ ` ,
35
+ githubContainer : css `
36
+ @media (max-width : 700px ) {
37
+ display : none;
38
+ }
39
+ ` ,
40
+ } ;
41
+
5
42
return (
6
- < div className = { style . rootContainer } >
7
- < img src = "/icon.png" className = { style . icon } alt = "document" />
8
- < h1 className = { style . title } > Pairwise Pict Online</ h1 >
43
+ < div className = { styles . rootContainer } >
44
+ < img src = "/icon.png" className = { styles . icon } alt = "document" />
45
+ < h1 className = { styles . title } > Pairwise Pict Online</ h1 >
9
46
< a
10
- className = { style . coffeeImgContainer }
47
+ className = { styles . coffeeImgContainer }
11
48
href = "https://www.buymeacoffee.com/FVSUK5u"
12
49
rel = "noopener noreferrer"
13
50
target = "_blank"
14
51
>
15
52
< img
16
53
alt = "Buy Me A Coffee"
17
- className = { style . coffeeImg }
54
+ className = { styles . coffeeImg }
18
55
src = "https://cdn.buymeacoffee.com/buttons/lato-white.png"
19
56
/>
20
57
</ a >
21
- < iframe
22
- src = "https://ghbtns.com/github-btn.html?user=junkboy0315& repo = pairwise - pict - online & type = star & count = true & size = large "
23
- frameBorder = "0"
24
- scrolling = "0"
25
- title = "github star icon"
26
- width = "160px"
27
- height = "30px"
28
- > </ iframe >
58
+ < div className = { styles . githubContainer } >
59
+ < iframe
60
+ src = "https://ghbtns.com/github-btn.html?user=junkboy0315& repo = pairwise - pict - online & type = star & count = true & size = large "
61
+ frameBorder = "0"
62
+ scrolling = "0"
63
+ title = "github star icon"
64
+ width = "160px"
65
+ height = "30px"
66
+ > </ iframe >
67
+ </ div >
29
68
</ div >
30
69
) ;
31
70
} ;
Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ export const Top = () => {
45
45
flex : 1 0 ; /* expand */
46
46
justify-content : space-between;
47
47
padding : 1rem ;
48
+ @media (max-width : 700px ) {
49
+ flex-direction : column;
50
+ }
48
51
` ,
49
52
adsRow : css `
50
53
flex : 0 0 90px ;
@@ -62,10 +65,26 @@ export const Top = () => {
62
65
flex-direction : column;
63
66
flex : 1 ;
64
67
` ,
68
+ generateButton : css `
69
+ align-self : center;
70
+ width : 8rem ;
71
+ margin : 1rem ;
72
+ ::after {
73
+ content : ' =>' ;
74
+ }
75
+ @media (max-width : 700px ) {
76
+ ::after {
77
+ content : none;
78
+ }
79
+ }
80
+ ` ,
65
81
download : css `
66
82
display : block;
67
83
margin : 0.5rem 0 1rem ;
68
84
text-align : center;
85
+ @media (max-width : 700px ) {
86
+ display : none;
87
+ }
69
88
` ,
70
89
} ;
71
90
@@ -102,15 +121,12 @@ export const Top = () => {
102
121
className = { style . download }
103
122
tabIndex = { - 1 }
104
123
>
105
- Download
124
+ Download Test Factors as .txt
106
125
</ a >
107
126
</ div >
108
127
109
- < Button
110
- onClick = { onGenerate }
111
- style = { { alignSelf : 'center' , width : '8rem' , margin : '0 1rem' } }
112
- >
113
- { isFetching ? 'loading...' : 'Generate=>' }
128
+ < Button onClick = { onGenerate } className = { style . generateButton } >
129
+ { isFetching ? 'loading...' : 'Generate' }
114
130
</ Button >
115
131
116
132
< div className = { style . results } >
@@ -125,7 +141,7 @@ export const Top = () => {
125
141
className = { style . download }
126
142
tabIndex = { - 1 }
127
143
>
128
- Download
144
+ Download Results as .txt
129
145
</ a >
130
146
</ div >
131
147
</ div >
You can’t perform that action at this time.
0 commit comments