Skip to content

Commit

Permalink
refactor: Box 컴포넌트 인터페이스 정의
Browse files Browse the repository at this point in the history
  • Loading branch information
gaeunnlee committed Mar 4, 2024
1 parent 9b3ea33 commit 5d909a8
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/components/ui/box/index.tsx
Original file line number Diff line number Diff line change
@@ -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<HTMLDivElement> {
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)' },
Expand Down

0 comments on commit 5d909a8

Please sign in to comment.