From 5e023d4f7bca05438a62bf18b4105517772ac3ad Mon Sep 17 00:00:00 2001 From: youngwooyoo Date: Wed, 2 Nov 2022 16:11:54 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"feat:=20=EB=A1=9C=EB=93=9C=EB=A7=B5?= =?UTF-8?q?=EC=9D=84=20=EC=9C=84=ED=95=9C=20=ED=95=98=EC=9C=84=20=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EA=B5=AC=ED=98=84(sidesheet=20mo?= =?UTF-8?q?dal)=20(#1048)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit dc1ce82ba1feb803aab58d2bbb6d4ccb833deee6. --- frontend/public/index.html | 2 - .../@shared/SideSheet/SideSheet.stories.tsx | 20 --------- .../@shared/SideSheet/SideSheet.style.ts | 42 ------------------- .../@shared/SideSheet/SideSheet.tsx | 27 ------------ 4 files changed, 91 deletions(-) delete mode 100644 frontend/src/components/@shared/SideSheet/SideSheet.stories.tsx delete mode 100644 frontend/src/components/@shared/SideSheet/SideSheet.style.ts delete mode 100644 frontend/src/components/@shared/SideSheet/SideSheet.tsx diff --git a/frontend/public/index.html b/frontend/public/index.html index 869a169f9..32713073a 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -41,7 +41,5 @@
-
-
diff --git a/frontend/src/components/@shared/SideSheet/SideSheet.stories.tsx b/frontend/src/components/@shared/SideSheet/SideSheet.stories.tsx deleted file mode 100644 index 9353aa8bf..000000000 --- a/frontend/src/components/@shared/SideSheet/SideSheet.stories.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { SideSheet, SideSheetProps } from './SideSheet'; - -const backdropRoot = document.createElement('div'); -backdropRoot.setAttribute('id', 'backdrop-root'); -document.body.append(backdropRoot); - -const modalRoot = document.createElement('div'); -modalRoot.setAttribute('id', 'overlay-root'); -document.body.append(modalRoot); - -export default { - title: 'Component/SideSheet', - component: SideSheet, -}; - -export const DefaultSideSheet = (args: SideSheetProps) => ; - -DefaultSideSheet.args = { - children: '테스트', -}; diff --git a/frontend/src/components/@shared/SideSheet/SideSheet.style.ts b/frontend/src/components/@shared/SideSheet/SideSheet.style.ts deleted file mode 100644 index 5163d22a0..000000000 --- a/frontend/src/components/@shared/SideSheet/SideSheet.style.ts +++ /dev/null @@ -1,42 +0,0 @@ -import styled from '@emotion/styled'; -import { css, keyframes } from '@emotion/react'; -import { SideSheetProps } from './SideSheet'; - -export type SideSheetContentProps = Pick; - -const slide = keyframes` - from{ - transform: translateX(100%); - } - to { - transform: translateX(0); - } -`; - -export const SideSheetContent = styled.div` - ${({ width }) => css` - position: fixed; - top: 0; - right: 0; - display: flex; - justify-content: center; - flex-wrap: wrap; - width: ${width ?? '500px'}; - height: 100%; - overflow-y: auto; - padding: 34px 0; - background-color: #fff; - z-index: 101; - animation: 0.25s ease-in forwards ${slide}; - `} -`; - -export const Backdrop = styled.div` - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100vh; - background-color: rgba(0, 0, 0, 0.4); - z-index: 100; -`; diff --git a/frontend/src/components/@shared/SideSheet/SideSheet.tsx b/frontend/src/components/@shared/SideSheet/SideSheet.tsx deleted file mode 100644 index beb1583b6..000000000 --- a/frontend/src/components/@shared/SideSheet/SideSheet.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { PropsWithChildren } from 'react'; -import ReactDOM from 'react-dom'; -import { Backdrop, SideSheetContent } from './SideSheet.style'; - -export type SideSheetProps = { - width?: string; - handleCloseSideSheet(): void; -}; - -export const SideSheet = ({ - children, - width, - handleCloseSideSheet, -}: PropsWithChildren) => { - return ( - <> - {ReactDOM.createPortal( - , - document.getElementById('backdrop-root') as HTMLElement - )} - {ReactDOM.createPortal( - {children}, - document.getElementById('overlay-root') as HTMLElement - )} - - ); -};