diff --git a/client/src/components/CafeDetailBottomSheet.tsx b/client/src/components/CafeDetailBottomSheet.tsx index acba492b..5d117b56 100644 --- a/client/src/components/CafeDetailBottomSheet.tsx +++ b/client/src/components/CafeDetailBottomSheet.tsx @@ -1,4 +1,5 @@ import { Suspense, useEffect } from 'react'; +import { createPortal } from 'react-dom'; import { BsX } from 'react-icons/bs'; import { styled } from 'styled-components'; import { useScrollSnapGuard } from 'yozm-cafe-react-scroll-snap'; @@ -29,41 +30,46 @@ const CafeDetailBottomSheet = (props: CafeDetailBottomSheetProps) => { }; return ( - - - - - {cafe.name} - - - - - - - - - - - {cafe.address} - - - - - - {/* + <> + {createPortal( + + + + + {cafe.name} + + + + + + + + + + + {cafe.address} + + + + + + {/*

000-000-000

*/} -
- - - {cafe.detail.description.split('\n').map((paragraph, index) => ( -

{paragraph}

- ))} -
- - -
+
+ + + {cafe.detail.description.split('\n').map((paragraph, index) => ( +

{paragraph}

+ ))} +
+ + +
, + document.bodyRoot, + )} + ); }; @@ -79,6 +85,7 @@ const Container = styled.div` width: 100%; height: 450px; + max-height: 100vh; padding: ${({ theme }) => theme.space[4]}; padding-bottom: 0; diff --git a/client/src/components/CafeMenuMiniList.tsx b/client/src/components/CafeMenuMiniList.tsx index 4c70e6d6..21928497 100644 --- a/client/src/components/CafeMenuMiniList.tsx +++ b/client/src/components/CafeMenuMiniList.tsx @@ -63,7 +63,6 @@ const MenuListItemContainer = styled.li` const MenuItemImageContainer = styled.div` width: 100%; - height: 100%; padding: ${({ theme }) => theme.space[2]}; & > * { @@ -92,8 +91,9 @@ const MenuItemImageAltIcon = styled(PiCoffeeFill)` height: 50%; `; -const MenuItemName = styled.div` +const MenuItemName = styled.p` font-size: ${({ theme }) => theme.fontSize.xs}; + text-align: center; `; const Divider = styled.hr` diff --git a/client/src/components/ImageModal.tsx b/client/src/components/ImageModal.tsx index ef59774a..739ff7fc 100644 --- a/client/src/components/ImageModal.tsx +++ b/client/src/components/ImageModal.tsx @@ -1,5 +1,6 @@ import type { MouseEventHandler } from 'react'; import { useState } from 'react'; +import { CgClose } from 'react-icons/cg'; import { styled } from 'styled-components'; import { useScrollSnapGuard } from 'yozm-cafe-react-scroll-snap'; import Resource from '../utils/Resource'; @@ -22,6 +23,11 @@ const ImageModal = (props: ImageModalProps) => { return ( + + + @@ -54,17 +60,34 @@ const Container = styled.div` background: rgba(0, 0, 0, 0.5); `; +const Actions = styled.div` + display: flex; + justify-content: flex-end; + padding: ${({ theme }) => theme.space[4]}; +`; + +const CloseIcon = styled(CgClose)` + font-size: ${({ theme }) => theme.fontSize['4xl']}; + color: white; +`; + const ActiveImageContainer = styled.div` touch-action: pan-x pan-y; + position: relative; + display: flex; flex: 1; align-items: center; justify-content: center; + + margin-top: ${({ theme }) => theme.space[4]}; + margin-bottom: ${({ theme }) => theme.space[4]}; `; const ActiveImage = styled.img` - width: 100%; + position: absolute; + max-height: 100%; `; const ImageList = styled.ul` diff --git a/client/src/components/OpeningHoursDetail.tsx b/client/src/components/OpeningHoursDetail.tsx index 638a3acc..d7896452 100644 --- a/client/src/components/OpeningHoursDetail.tsx +++ b/client/src/components/OpeningHoursDetail.tsx @@ -64,15 +64,18 @@ const OpeningHoursDetail = (props: OpeningHoursDetailProps) => { export default OpeningHoursDetail; -const Container = styled.div``; +const Container = styled.div` + display: inline-flex; + flex-direction: column; +`; const Summary = styled.h3``; const Details = styled.ul` - display: flex; + display: inline-flex; flex-direction: column; gap: ${({ theme }) => theme.space[1]}; - align-items: flex-end; + align-self: end; color: ${({ theme }) => theme.color.gray}; `; diff --git a/client/src/styles/GlobalStyle.ts b/client/src/styles/GlobalStyle.ts index b1a215c7..020c8412 100644 --- a/client/src/styles/GlobalStyle.ts +++ b/client/src/styles/GlobalStyle.ts @@ -33,6 +33,16 @@ const GlobalStyle = createGlobalStyle` cursor: pointer; } + h1, + h2, + h3, + h4, + h5, + h6, + p { + word-break: keep-all; + } + #root { position: relative;