This repository was archived by the owner on Mar 9, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +76
-2
lines changed Expand file tree Collapse file tree 2 files changed +76
-2
lines changed Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+ import styled from 'react-emotion' ;
3
+
4
+ import { Button , graySecondary } from '../../utils/base.styles' ;
5
+
6
+ const Card = styled . a `
7
+ text-decoration: none;
8
+ width: calc(100% - 40px);
9
+ margin: 20px;
10
+ padding-right: 10px;
11
+ display: grid;
12
+ grid-template-columns: 1fr 4fr;
13
+ grid-template-rows: 1.2fr 1fr 1fr;
14
+ grid-template-areas:
15
+ 'photo title'
16
+ 'photo location'
17
+ 'photo info';
18
+ background: #fff;
19
+ border: 1px solid ${ graySecondary } ;
20
+ transition: all 0.25s;
21
+ & .photo {
22
+ grid-area: photo;
23
+ width: 120px;
24
+ height: auto;
25
+ }
26
+ & .title {
27
+ grid-area: title;
28
+ }
29
+ & .location {
30
+ grid-area: location;
31
+ }
32
+ & .info {
33
+ grid-area: info;
34
+ display: flex;
35
+ flex-direction: row;
36
+ flex-wrap: nowrap;
37
+ justify-content: flex-start;
38
+ align-content: stretch;
39
+ align-items: center;
40
+ }
41
+ & .infotext {
42
+ order: 0;
43
+ flex: 0 1 auto;
44
+ align-self: auto;
45
+ }
46
+ & .rsvp {
47
+ order: 0;
48
+ align-items: flex-end;
49
+ flex: 1 1 auto;
50
+ align-self: auto;
51
+ text-align: right;
52
+ }
53
+ }
54
+ ` ;
55
+
56
+ export default ( ) => (
57
+ < div >
58
+ < Card >
59
+ < img className = "photo" src = "http://via.placeholder.com/100x100" />
60
+ < div className = "title" > A huge Meetup</ div >
61
+ < div className = "location" > Location</ div >
62
+ < div className = "info" >
63
+ < div className = "infotext" > Time</ div >
64
+ < div className = "infotext" > Time</ div >
65
+ < div className = "infotext" > Time</ div >
66
+ < div className = "rsvp" >
67
+ < Button ghost > RSVP</ Button >
68
+ </ div >
69
+ </ div >
70
+ </ Card >
71
+ </ div >
72
+ ) ;
Original file line number Diff line number Diff line change 1
1
import styled , { css } from 'react-emotion' ;
2
2
3
- const purplePrimary = '#7657fb' ;
4
- const whiteFull = '#ffffff' ;
3
+ export const purplePrimary = '#7657fb' ;
4
+ export const whiteFull = '#ffffff' ;
5
+ export const graySecondary = '#b9b9b9' ;
6
+
5
7
export const breakpoints = {
6
8
xs : '@media screen and (max-width: 40em)' ,
7
9
sm : '@media screen and (min-width: 40em) and (max-width: 52em)' ,
You can’t perform that action at this time.
0 commit comments