diff --git a/src/app/create/_components/item/LinkPreview.css.ts b/src/app/create/_components/item/LinkPreview.css.ts deleted file mode 100644 index a7c14b02..00000000 --- a/src/app/create/_components/item/LinkPreview.css.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { style } from '@vanilla-extract/css'; - -export const previewBox = style({ - width: '90px', - height: '90px', - - display: 'flex', - flexDirection: 'column', - justifyContent: 'center', - alignItems: 'center', - - position: 'relative', - - backgroundColor: '#EBF4FF', - - borderRadius: '10px', - whiteSpace: 'pre-wrap', - overflow: 'hidden', - cursor: 'pointer', -}); - -export const clearButton = style({ - position: 'absolute', - top: '5px', - right: '5px', -}); diff --git a/src/app/create/_components/item/LinkPreview.tsx b/src/app/create/_components/item/LinkPreview.tsx deleted file mode 100644 index 85f6c161..00000000 --- a/src/app/create/_components/item/LinkPreview.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import Image from 'next/image'; - -import ClearBlackIcon from '/public/icons/clear_x_black.svg'; -import LinkIcon from '/public/icons/link.svg'; -import * as styles from './LinkPreview.css'; - -interface LinkPreviewProps { - type: 'link' | 'image'; - url?: string; - domain?: string; - imageUrl?: string; - handleClearButtonClick: () => void; -} - -export default function PreviewBox({ type, url, domain, imageUrl, handleClearButtonClick }: LinkPreviewProps) { - const handlePreviewClick = () => { - window.open(url); - }; - - const handleClearClick = (e: React.MouseEvent) => { - e.stopPropagation(); - handleClearButtonClick(); - }; - - return ( -
- {type === 'link' && ( - <> - -

{domain}

- - )} - {type === 'image' && 첨부 이미지} - -
- ); -}