-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
228 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import React from 'react'; | ||
import * as S from './styles'; | ||
import Header from 'components/header/Header'; | ||
const Layout: React.FC = ({ children }) => { | ||
return <S.Wrapper>{children}</S.Wrapper>; | ||
return ( | ||
<> | ||
<Header /> | ||
<S.Wrapper>{children}</S.Wrapper> | ||
</> | ||
); | ||
}; | ||
|
||
export default Layout; |
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
Empty file.
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,7 +1,23 @@ | ||
import React from 'react'; | ||
import React, { useEffect } from 'react'; | ||
import * as S from './styles'; | ||
const ItemList: React.FC = () => { | ||
return <S.ItemListWrapper></S.ItemListWrapper>; | ||
import AddItemCard from 'components/common/AddItemCard'; | ||
import Thumbnail from 'components/common/Thumbnail'; | ||
interface Props { | ||
itemList: string[]; //데이터 형식에따라 타입 변환할 것 | ||
} | ||
const ItemList: React.FC<Props> = ({ itemList }) => { | ||
useEffect(() => { | ||
console.log(itemList); | ||
}, [itemList]); | ||
return ( | ||
<S.ItemListWrapper> | ||
{itemList.length ? ( | ||
itemList.map((item, i) => <Thumbnail key={i} item={item}></Thumbnail>) | ||
) : ( | ||
<AddItemCard></AddItemCard> | ||
)} | ||
</S.ItemListWrapper> | ||
); | ||
}; | ||
|
||
export default ItemList; |
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,6 +1,9 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const ItemListWrapper = styled.div` | ||
height: 20px; | ||
background-color: black; | ||
display: grid; | ||
grid-template-columns: repeat(auto-fill, minmax(363px, 1fr)); | ||
row-gap: 25px; | ||
column-gap: 24px; | ||
`; |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
import { AddImageWrapper, AddImageSvg } from '../Atomic/AddItem'; | ||
const AddItem = () => { | ||
return ( | ||
<AddItemCard> | ||
<AddImageWrapper> | ||
<AddImageText>게시물을 추가 해주세요.</AddImageText> | ||
<AddImageSvg width={80} height={80} /> | ||
</AddImageWrapper> | ||
</AddItemCard> | ||
); | ||
}; | ||
|
||
export default AddItem; | ||
|
||
const AddItemCard = styled.div` | ||
width: 363px; | ||
height: 280px; | ||
background-color: ${({ theme }) => theme.color.gray_100}; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
border-radius: 10px; | ||
`; | ||
|
||
const AddImageText = styled.span` | ||
color: ${(props) => props.theme.color.addTextGray}; | ||
font-size: 14px; | ||
margin-bottom: 16px; | ||
`; |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import styled, { css, DefaultTheme } from 'styled-components'; | ||
|
||
export const TabButton = styled.button<{ active: boolean; theme: DefaultTheme }>` | ||
display: inline-block; | ||
height: 31px; | ||
font-size: 16px; | ||
line-height: 1.448125; | ||
padding: 4px 12px; | ||
border-radius: 24px; | ||
margin-left: 24px; | ||
font-weight: ${({ theme }) => theme.fontWeight.medium}; | ||
background-color: ${({ theme }) => theme.color.white}; | ||
border: 1px solid ${({ theme }) => theme.color.gray_300}; | ||
color: ${({ theme }) => theme.color.black}; | ||
span { | ||
margin-left: 4px; | ||
color: ${({ theme }) => theme.color.gray_400}; | ||
} | ||
${({ active }) => { | ||
return ( | ||
active && | ||
css` | ||
border: none; | ||
background-color: ${({ theme }) => theme.color.black}; | ||
color: ${({ theme }) => theme.color.white}; | ||
span { | ||
} | ||
` | ||
); | ||
}}; | ||
`; |
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import React from 'react'; | ||
import styled, { css } from 'styled-components'; | ||
import Image from 'next/image'; | ||
|
||
interface Props { | ||
item: string; //작품 정보에 대한 타입을 정의해줘야함 | ||
} | ||
const Thumbnail: React.FC<Props> = ({ item }) => { | ||
return ( | ||
<ItemCard> | ||
<ImageWrapper> | ||
<Image src="/images/icon-folder-add.svg" width={24} height={24} /> | ||
</ImageWrapper> | ||
{item.length > 0 && ( | ||
<ItemInfo> | ||
<p>{item}</p> | ||
</ItemInfo> | ||
)} | ||
</ItemCard> | ||
); | ||
}; | ||
|
||
export default Thumbnail; | ||
|
||
const ItemCard = styled.div` | ||
position: relative; | ||
width: 363px; | ||
height: 280px; | ||
border-radius: 10px; | ||
background-color: ${({ theme }) => theme.color.gray_500}; | ||
overflow: hidden; | ||
`; | ||
|
||
const ItemInfo = styled.div` | ||
position: absolute; | ||
bottom: 0; | ||
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 70.31%); | ||
width: 100%; | ||
height: 100px; | ||
padding: 0 16px; | ||
p { | ||
position: absolute; | ||
color: ${({ theme }) => theme.color.white}; | ||
font-weght: ${({ theme }) => theme.fontWeight.medium}; | ||
font-size: 16px; | ||
line-height: 1.4375; | ||
letter-spacing: 0.02em; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
width: 332px; | ||
height: 23px; | ||
bottom: 16px; | ||
} | ||
`; | ||
|
||
const ImageWrapper = styled.button` | ||
position: absolute; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
z-index: 1; | ||
width: 32px; | ||
height: 32px; | ||
top: 16px; | ||
right: 16px; | ||
background: rgba(0, 0, 0, 0.5); | ||
border-radius: 5px; | ||
`; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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