-
Notifications
You must be signed in to change notification settings - Fork 1
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
12 changed files
with
213 additions
and
142 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,12 +1,8 @@ | ||
import React from 'react'; | ||
import HistorySwiper from '../HistorySwiper/HistorySwiper'; | ||
import HistorySwiperSummary from '../HistorySwiper/Summary/HistorySwiperSummary'; | ||
|
||
const History = () => { | ||
return ( | ||
<section> | ||
<HistorySwiper /> | ||
</section> | ||
); | ||
return <section>{/* <HistorySwiperSummary /> */}</section>; | ||
}; | ||
|
||
export default History; |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// const HistorySwiperSummary = () => { | ||
// return ( | ||
// <OceanSwiper> | ||
// <OceanSwiper.Top className={topStyle}> | ||
// {/* <HistorySlideButton direction="PREV" /> */} | ||
// {/* <HistoryTab /> */} | ||
// {/* <HistorySlideButton direction="NEXT" /> */} | ||
// </OceanSwiper.Top> | ||
// <OceanSwiper.Main hiddenNavigation> | ||
// {/* <OceanSwiper.Slide></OceanSwiper.Slide> */} | ||
// {/* <OceanSwiper.Slide></OceanSwiper.Slide> */} | ||
// {/* <OceanSwiper.Slide></OceanSwiper.Slide> */} | ||
// </OceanSwiper.Main> | ||
// </OceanSwiper> | ||
// ); | ||
// }; |
22 changes: 22 additions & 0 deletions
22
src/components/HistorySwiper/Summary/HistorySwiperSummary.css.ts
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,22 @@ | ||
import { style } from '@vanilla-extract/css'; | ||
import { flexColumn } from '@/styles/common/flex.css'; | ||
|
||
export const wrapStyle = style([]); | ||
|
||
export const topStyle = style([ | ||
flexColumn, | ||
{ | ||
gap: '0.75rem', | ||
}, | ||
]); | ||
|
||
export const gapStyle = style({ | ||
gap: '0.75rem', | ||
}); | ||
|
||
export const slideStyle = style([ | ||
gapStyle, | ||
{ | ||
display: 'flex', | ||
}, | ||
]); |
57 changes: 57 additions & 0 deletions
57
src/components/HistorySwiper/Summary/HistorySwiperSummary.tsx
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,57 @@ | ||
'use client'; | ||
|
||
import 'swiper/css'; | ||
|
||
import React from 'react'; | ||
import HistoryCard from '@/components/Card/History/HistoryCard'; | ||
import { HistoryCardContextProps } from '@/components/Card/History/HistoryCard.context'; | ||
import { historyCardWrapWidthStyle } from '@/components/Card/History/HistoryCard.css'; | ||
import Pagination from '@/composable/Pagination/Pagination'; | ||
import Spacer from '@/composable/Spacer/Spacer'; | ||
import OceanSwiper from '../../OceanSwiper/OceanSwiper'; | ||
import { gapStyle, slideStyle, topStyle } from './HistorySwiperSummary.css'; | ||
|
||
interface HistoryCardData extends HistoryCardContextProps { | ||
id: string; | ||
} | ||
|
||
interface Props { | ||
title: string; | ||
data: HistoryCardData[]; | ||
} | ||
|
||
const HistorySwiperSummary = ({ title, data }: Props) => { | ||
return ( | ||
<OceanSwiper> | ||
<OceanSwiper.Top className={topStyle}> | ||
<h2>{title}</h2> | ||
<Pagination | ||
length={data.length} | ||
selectedIdx={-1} | ||
wrapperGapClass={gapStyle} | ||
contentsWidthClass={historyCardWrapWidthStyle} | ||
/> | ||
</OceanSwiper.Top> | ||
{/* TODO 반응형 */} | ||
<Spacer direction="horizontal" spacing="spacer-15" /> | ||
<OceanSwiper.Main> | ||
<OceanSwiper.Slide> | ||
<div className={slideStyle}> | ||
{data.map((history) => ( | ||
<HistoryCard | ||
key={history.id} | ||
companyName={history.companyName} | ||
period={history.period} | ||
> | ||
<HistoryCard.Company /> | ||
<HistoryCard.Period /> | ||
</HistoryCard> | ||
))} | ||
</div> | ||
</OceanSwiper.Slide> | ||
</OceanSwiper.Main> | ||
</OceanSwiper> | ||
); | ||
}; | ||
|
||
export default HistorySwiperSummary; |
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
Oops, something went wrong.