Skip to content

Commit

Permalink
[FEAT] Card 외부 링크 연결 (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
jh2ee committed Jul 22, 2023
1 parent 994076f commit 57e640a
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 13 deletions.
18 changes: 13 additions & 5 deletions job1/src/Component/InfoCard.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@

import styled from "styled-components";
import { Link } from "react-router-dom";

function InfoCard(props){
return(
<Card>
<Img src={props.img} alt={props.name} />
<Text>
<Institution>{props.name}</Institution>
<Tel href='tel:{props.tel}' >☎️ Tel: {props.tel}</Tel>
</Text>
<InfoLink to={props.url} target="_blank">
<Img src={props.img} alt={props.name} />
<Text>
<Institution>{props.name}</Institution>
<Tel href='tel:{props.tel}' >☎️ Tel: {props.tel}</Tel>
</Text>
</InfoLink>
</Card>
)
}
Expand All @@ -25,6 +28,11 @@ const Card=styled.div`
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.12);
`

const InfoLink=styled(Link)`
text-decoration: none;
color: inherit;
`

const Text=styled.div`
padding-left: 1.5rem;
text-align: left;
Expand Down
46 changes: 38 additions & 8 deletions job1/src/Main/MoreInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,65 @@ import styled from "styled-components";

function MoreInfo(){
return(
<div align="center">
<div>
<h3>해결 방법을 찾지 못했나요?</h3>
<p>아래 기관에서 전문적인 도움을 받아보세요</p>
</div>
<MoreInfoContainer>
<MoreInfoContainer>
<InfoText>
<InfoTitle>해결 방법을 찾지 못했나요?</InfoTitle>
<InfoContent>아래 기관에서 전문적인 도움을 받아보세요</InfoContent>
</InfoText>
<MoreInfoCardContainer>
<InfoCard
img='/Images/MoreInfo1.png'
name='고용노동부 고객 상담 센터'
tel='1350'
url='https://1350.moel.go.kr/home/'
/>
<InfoCard
img='/Images/MoreInfo2.png'
name='직장 내 괴롭힘 상담센터'
tel='1522-9000'
url='https://www.moel.go.kr/common/downloadFile.do?file_seq=20230101624&bbs_seq=20230101072&bbs_id=29'
/>
<InfoCard
img='/Images/MoreInfo3.png'
name='근로 복지 공단'
tel='1588-0075'
url='https://www.comwel.or.kr/'
/>
</MoreInfoContainer>
</div>
</MoreInfoCardContainer>
</MoreInfoContainer>
)
}

export default MoreInfo;

const MoreInfoContainer=styled.div`
text-align: center;
padding: 4rem;
margin: 8rem 0 0 0;
background: #E4EEE3;
`

const InfoText=styled.div``

const InfoTitle=styled.h3`
color: #000;
font-feature-settings: 'clig' off, 'liga' off;
font-family: DM Sans;
font-size: 1.75rem;
font-style: normal;
font-weight: 700;
`

const InfoContent=styled.p`
color: var(--my-dark-green, #174D16);
font-feature-settings: 'clig' off, 'liga' off;
font-family: DM Sans;
font-size: 1rem;
font-style: normal;
font-weight: 400;
`

const MoreInfoCardContainer=styled.div`
display: flex;
justify-content: center;
align-items: center;
Expand Down

0 comments on commit 57e640a

Please sign in to comment.