Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

튜토리얼 모달 svg 리사이즈, 화살표 Carousel 움직이기 기능 추가 #499

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@tanstack/react-query": "^4.29.19",
"axios": "^1.4.0",
"dotenv": "^16.3.1",
"hang-log-design-system": "^1.2.24",
"hang-log-design-system": "^1.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.14.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const boxStyling = css({
export const modalStyling = css({
'@media screen and (max-width: 600px)': {
width: `calc(100vw - ${Theme.spacer.spacing5})`,
height: `calc(100vh - ${Theme.spacer.spacing9})`,
},
});

Expand Down
44 changes: 25 additions & 19 deletions frontend/src/components/trips/TutorialModal/TutorialModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ import { useEffect } from 'react';

import { useRecoilValue } from 'recoil';

import { Button, Flex, Modal, SVGCarousel, useOverlay } from 'hang-log-design-system';

import {
boxStyling,
buttonStyling,
modalStyling,
} from '@components/trips/TutorialModal/TutorialModal.style';

// Button,
// Flex,
// Modal,
// SVGCarousel,
SVGCarouselModal,
useOverlay,
} from 'hang-log-design-system';

// import {
// boxStyling,
// buttonStyling,
// modalStyling,
// } from '@components/trips/TutorialModal/TutorialModal.style';
import { mediaQueryMobileState } from '@store/mediaQuery';

import Tutorial1SVG from '@assets/svg/tutorial1.svg';
Expand All @@ -26,18 +32,18 @@ const TutorialModal = () => {
}, [openTutorial]);

return (
<Modal isOpen={isTutorialOpen} closeModal={closeTutorial} hasCloseButton css={modalStyling}>
<Flex css={boxStyling}>
<SVGCarousel
width={isMobile ? 390 : 385}
height={isMobile ? 424 : 412}
images={[Tutorial1SVG, Tutorial2SVG, Tutorial3SVG, Tutorial4SVG]}
/>
</Flex>
<Button variant="primary" css={buttonStyling} onClick={closeTutorial}>
닫기
</Button>
</Modal>
<SVGCarouselModal
modalWidth={isMobile ? window.innerWidth - 32 - 48 : 385}
modalHeight={isMobile ? window.innerWidth : 412}
isOpen={isTutorialOpen}
closeModal={closeTutorial}
carouselWidth={isMobile ? window.innerWidth - 32 - 48 : 385}
carouselHeight={isMobile ? window.innerWidth : 412}
carouselImages={[Tutorial1SVG, Tutorial2SVG, Tutorial3SVG, Tutorial4SVG]}
showArrows
showDots
buttonGap={isMobile ? 0 : 48}
/>
);
};

Expand Down