11import React from 'react' ;
2+
23import { Link } from 'react-router-dom' ;
34
45import styled from '@emotion/styled' ;
6+
57import Tags from '../common/Tags' ;
8+ import palette from '../../styles/palette' ;
69
7- const StudyGroupWrapper = styled . div `` ;
10+ const StudyGroupWrapper = styled . div `
11+ margin: 1em .5em 1em .5em;
12+ padding: 2em 0 1em 1em;
13+ width: 28%;
14+ border: 2px solid ${ palette . gray [ 4 ] } ;
15+ border-radius: 1rem;
16+ ` ;
817
918const HeaderLink = styled ( Link ) `
10- font-size: 1.5em;
11- margin-bottom: 0;
12- margin-top: 0;
13- font-weight: bold;
19+ display: flex;
20+ align-items: center;
21+ justify-content: center;
22+ font-size: 2rem;
23+ font-weight: 500;
24+ font-family: 'Nanum Pen Script', cursive;
1425 &:hover {
15- color: gray;
26+ color: ${ palette . gray [ 6 ] } ;
27+ }
28+ ` ;
29+
30+ const StudyInfoWrapper = styled . div `
31+ margin: 1rem 0 1rem 0;
32+ .moderator{
33+ margin-bottom: 1rem;
34+ color: ${ palette . gray [ 5 ] } ;
35+ font-weight: bold;
1636 }
1737` ;
1838
39+ const DateTimeChange = styled . div `
40+ margin-left: 1.5rem;
41+ font-weight: 600;
42+ font-size: 1.1rem;
43+ font-family: 'Gamja Flower', cursive;
44+ padding: .1rem .5rem .1rem .5rem;
45+ display: inline-flex;
46+ color: white;
47+ border-radius: 0.5rem;
48+ margin-top: 1rem;
49+ margin-bottom: 1rem;
50+ background: ${ palette . cyan [ 4 ] } ;
51+ ` ;
52+
1953const StudyGroup = ( { group } ) => {
2054 const {
2155 id, moderatorId, title, personnel, applyEndDate, tags, participants,
@@ -26,14 +60,17 @@ const StudyGroup = ({ group }) => {
2660 < HeaderLink to = { `/introduce/${ id } ` } >
2761 { title }
2862 </ HeaderLink >
29- < div >
30- < small > { moderatorId } </ small >
31- < div > { `모집 인원: ${ participants . length } / ${ personnel } ` } </ div >
63+ < StudyInfoWrapper >
64+ < div className = "moderator" > { moderatorId } </ div >
65+ < div >
66+ { `모집 인원: ${ participants . length } / ${ personnel } ` }
67+ < DateTimeChange > 모집중</ DateTimeChange >
68+ </ div >
3269 < div >
33- < div > { `마감 일자: ${ applyEndDate } ` } </ div >
70+ { `마감 일자: ${ applyEndDate } ` }
3471 </ div >
3572 < Tags tags = { tags } />
36- </ div >
73+ </ StudyInfoWrapper >
3774 </ StudyGroupWrapper >
3875 ) ;
3976} ;
0 commit comments