-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(aboutmeinfo): add props such as titleColor, descriptionColor #164
- Loading branch information
Showing
4 changed files
with
37 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,34 @@ | ||
import styled from 'styled-components'; | ||
import { AboutMeInfoPropsType } from '../../common/types/ComponentTypes/Contact/AboutMeInfoType'; | ||
|
||
const Container = styled.div` | ||
margin: 10px 0px; | ||
`; | ||
|
||
const AboutMeEachContainer = styled.div` | ||
margin: 10px 0px 10px 10px; | ||
`; | ||
|
||
const AboutMeTitle = styled.div` | ||
font-weight: bold; | ||
color: #00000066; | ||
`; | ||
|
||
const AboutMe = ({ aboutMeInfos }: any) => { | ||
return ( | ||
<Container> | ||
{aboutMeInfos.map(({ title, description }: AboutMeInfoPropsType, idx: number) => ( | ||
{aboutMeInfos.map(({ title, titleColor, description, descriptionColor }: AboutMeInfoPropsType, idx: number) => ( | ||
<AboutMeEachContainer key={idx}> | ||
<AboutMeTitle>{title}</AboutMeTitle> | ||
<div>{description}</div> | ||
<AboutMeTitle titleColor={titleColor}>{title}</AboutMeTitle> | ||
<AboutMeDescription descriptionColor={descriptionColor}>{description}</AboutMeDescription> | ||
</AboutMeEachContainer> | ||
))} | ||
</Container> | ||
); | ||
}; | ||
|
||
export default AboutMe; | ||
|
||
const Container = styled.div` | ||
margin: 10px 0px; | ||
`; | ||
|
||
const AboutMeEachContainer = styled.div` | ||
margin: 10px 0px 10px 10px; | ||
`; | ||
|
||
const AboutMeTitle = styled.div<AboutMeInfoPropsType>` | ||
font-weight: bold; | ||
color: ${({ titleColor }) => titleColor}; | ||
`; | ||
|
||
const AboutMeDescription = styled.div<AboutMeInfoPropsType>` | ||
color: ${({ descriptionColor }) => descriptionColor}; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters