@@ -47,9 +47,18 @@ const ButtonStyles = css.global`
47
47
.button.primary {
48
48
color: #ffffff;
49
49
background: ${ theme . colors . primaryColor } ;
50
- border: none;
50
+ border: 2px solid transparent;
51
+ box-shadow: 2px 2px #ffffff, 4px 4px ${ theme . colors . primaryColor } ;
52
+ }
53
+ .button.secondary {
54
+ color: ${ theme . colors . primaryColor } ;
55
+ background: ${ theme . colors . primaryLite } ;
51
56
box-shadow: 2px 2px #ffffff, 4px 4px ${ theme . colors . primaryColor } ;
52
57
}
58
+ .button.flat {
59
+ box-shadow: none;
60
+ position: relative;
61
+ }
53
62
54
63
.borderless {
55
64
border: none;
@@ -164,6 +173,7 @@ export default function Button({
164
173
} ) {
165
174
let classes = [ `button` , variant , className ]
166
175
if ( disabled ) classes . push ( 'disabled' )
176
+ if ( flat ) classes . push ( 'flat' )
167
177
let classNames = classes . join ( ' ' )
168
178
if ( type === 'submit' ) {
169
179
return (
@@ -181,16 +191,16 @@ export default function Button({
181
191
< style jsx > { ButtonStyles } </ style >
182
192
< style jsx > { `
183
193
.button {
184
- box-shadow: ${ flat && 'none' } ;
185
- position: relative ;
194
+ min-width: 1.75rem ;
195
+ min-height: 1.75rem ;
186
196
}
187
197
.button::after {
188
198
content: '';
189
- position: absolute;
199
+ position: ${ useIcon && ' absolute' } ;
190
200
top: 0;
191
201
left: 0;
192
- width: 100%;
193
- height: 100%;
202
+ width: ${ useIcon && ' 100%' } ;
203
+ height: ${ useIcon && ' 100%' } ;
194
204
mask: ${ useIcon
195
205
? `url(${ join ( URL , `/static/icon-${ useIcon } .svg` ) } )`
196
206
: 'none' } ;
@@ -218,16 +228,16 @@ export default function Button({
218
228
< style jsx > { ButtonStyles } </ style >
219
229
< style jsx > { `
220
230
.button {
221
- box-shadow: ${ flat && 'none' } ;
222
- position: relative ;
231
+ min-width: 1.75rem ;
232
+ min-height: 1.75rem ;
223
233
}
224
234
.button::after {
225
235
content: '';
226
- position: absolute;
236
+ position: ${ useIcon && ' absolute' } ;
227
237
top: 0;
228
238
left: 0;
229
- width: 100%;
230
- height: 100%;
239
+ width: ${ useIcon && ' 100%' } ;
240
+ height: ${ useIcon && ' 100%' } ;
231
241
mask: ${ useIcon
232
242
? `url(${ join ( URL , `/static/icon-${ useIcon } .svg` ) } )`
233
243
: 'none' } ;
@@ -253,18 +263,16 @@ export default function Button({
253
263
< style jsx > { ButtonStyles } </ style >
254
264
< style jsx > { `
255
265
.button {
256
- box-shadow: ${ flat && 'none' } ;
257
- position: relative;
258
266
min-width: 1.75rem;
259
267
min-height: 1.75rem;
260
268
}
261
269
.button::after {
262
270
content: '';
263
- position: absolute;
271
+ position: ${ useIcon && ' absolute' } ;
264
272
top: 0;
265
273
left: 0;
266
- width: 100%;
267
- height: 100%;
274
+ width: ${ useIcon && ' 100%' } ;
275
+ height: ${ useIcon && ' 100%' } ;
268
276
mask: ${ useIcon
269
277
? `url(${ join ( URL , `/static/icon-${ useIcon } .svg` ) } )`
270
278
: 'none' } ;
0 commit comments