From 5d909a8c49062bc57e3998176d29955dc2f7c786 Mon Sep 17 00:00:00 2001 From: gaeunnlee Date: Mon, 4 Mar 2024 16:10:01 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20Box=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20=EC=9D=B8=ED=84=B0=ED=8E=98=EC=9D=B4=EC=8A=A4=20?= =?UTF-8?q?=EC=A0=95=EC=9D=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ui/box/index.tsx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/components/ui/box/index.tsx b/src/components/ui/box/index.tsx index 0b67555..971af04 100644 --- a/src/components/ui/box/index.tsx +++ b/src/components/ui/box/index.tsx @@ -1,15 +1,12 @@ -import React, { ComponentProps } from 'react'; -import { IWithReactChildren } from 'shared/interfaces/default-interfaces'; +import React from 'react'; -export default function Box({ - children, - className, - type, - padding, - border, - ...props -}: IWithReactChildren & - ComponentProps<'div'> & { type?: 'shadow' | 'shadowImage'; padding?: string; border?: string }) { +interface BoxProps extends React.HTMLAttributes { + type?: 'shadow' | 'shadowImage'; + padding?: string; + border?: string; +} + +export default function Box({ children, className, type, padding, border, ...props }: BoxProps) { const boxType = { shadow: { boxShadow: '1px 1px 3px 0px rgba(0, 0, 0, 0.1)', border: 'none' }, shadowImage: { padding: '0', boxShadow: '1px 1px 3px 0px rgba(0, 0, 0, 0.1)' },