This commit is contained in:
focp212@naver.com
2025-10-25 21:48:27 +09:00
33 changed files with 657 additions and 284 deletions

View File

@@ -0,0 +1,90 @@
import { BottomSheetMotionDuration, BottomSheetMotionVaiants } from '@/entities/common/model/constant';
import { IMAGE_ROOT } from '@/shared/constants/common';
import { motion } from 'framer-motion';
export interface DownloadTypeBottomSheetProps {
bottomSheetOn: boolean;
setBottomSheetOn: (bottomSheetOn: boolean) => void;
onSelectType: (type: 'IMAGE' | 'EMAIL') => void;
}
export const DownloadTypeBottomSheet = ({
bottomSheetOn,
setBottomSheetOn,
onSelectType
}: DownloadTypeBottomSheetProps) => {
const onClickToClose = () => {
setBottomSheetOn(false);
};
const handleSelectType = (type: 'IMAGE' | 'EMAIL') => {
onSelectType(type);
setBottomSheetOn(false);
};
return (
<>
{ (bottomSheetOn) &&
<div className="bg-dim"></div>
}
<motion.div
className="bottomsheet"
initial="hidden"
animate={ (bottomSheetOn)? 'visible': 'hidden' }
variants={ BottomSheetMotionVaiants }
transition={ BottomSheetMotionDuration }
>
<div className="bottomsheet-header">
<div className="bottomsheet-title">
<h2> </h2>
<button
className="close-btn"
type="button"
>
<img
src={ IMAGE_ROOT + '/ico_close.svg' }
alt="닫기"
onClick={ () => onClickToClose() }
/>
</button>
</div>
</div>
<div className="bottomsheet-content">
<div className="email-section">
<div
className="email-label mb-10"
onClick={() => handleSelectType('IMAGE')}
style={{ cursor: 'pointer' }}
>
<div className="mail-icon">
<div className="mail-icon-bg"></div>
<img
src={ IMAGE_ROOT + '/ico_pic.svg' }
alt="이미지"
/>
</div>
<span className="label-text"> </span>
</div>
<div
className="email-label"
onClick={() => handleSelectType('EMAIL')}
style={{ cursor: 'pointer' }}
>
<div className="mail-icon">
<div className="mail-icon-bg"></div>
<img
src={ IMAGE_ROOT + '/ico_email.svg' }
alt='메일'
/>
</div>
<span className="label-text"> </span>
</div>
</div>
</div>
</motion.div>
</>
);
};