/** @jsxImportSource @emotion/react */ import { LoadingSpinner } from '@/@dble_layout'; import { Interpolation, Theme } from '@emotion/react'; import { ReactNode, useRef } from 'react'; // interface Props { onUpload: (e: any) => void; onCancel: () => void; loading?: boolean; source: string; alt?: string; size?: number; } // const AvatarUploader = ({ size = 100, source, alt = '업로드 이미지', onUpload, onCancel, loading }: Props) => { const uploadRef = useRef(null); const handleClick = () => { if (!loading) uploadRef.current?.click(); }; return ( {source ? ( <> {alt}
) : ( {loading ? : } )}
); }; const CameraIcon = ({ size }: { size: number }) => { return ( ); }; const CancelIcon = () => { return ( ); }; export default AvatarUploader; // // const flextT: Interpolation = { position: 'relative', display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', userSelect: 'none', }; // const Wrapper = ({ children, size, bg, br }: { children: ReactNode; size: number; bg?: string; br?: number }) => (
{children}
);