diff --git a/front/src/assets/imarketkorea-logo-white.png b/front/src/assets/imarketkorea-logo-white.png new file mode 100644 index 0000000..297c69c Binary files /dev/null and b/front/src/assets/imarketkorea-logo-white.png differ diff --git a/front/src/assets/imarketkorea-logo.png b/front/src/assets/imarketkorea-logo.png new file mode 100644 index 0000000..9b0d88a Binary files /dev/null and b/front/src/assets/imarketkorea-logo.png differ diff --git a/front/src/component/Button.tsx b/front/src/components/Button.tsx similarity index 93% rename from front/src/component/Button.tsx rename to front/src/components/Button.tsx index fce5fe4..6d5c995 100644 --- a/front/src/component/Button.tsx +++ b/front/src/components/Button.tsx @@ -11,7 +11,8 @@ export type ButtonSize = 'sm' | 'md' | 'lg' const base = 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium ' + - 'transition-colors cursor-pointer select-none ' + + 'transition-[color,background-color,transform] cursor-pointer select-none ' + + 'active:scale-[0.98] ' + 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ' + 'disabled:pointer-events-none disabled:opacity-50' diff --git a/front/src/component/Input.tsx b/front/src/components/Input.tsx similarity index 100% rename from front/src/component/Input.tsx rename to front/src/components/Input.tsx diff --git a/front/src/components/Logo.tsx b/front/src/components/Logo.tsx new file mode 100644 index 0000000..8278918 --- /dev/null +++ b/front/src/components/Logo.tsx @@ -0,0 +1,56 @@ +import { type ComponentProps } from 'react' +import { cn } from './cn' +import logoColor from '@/assets/imarketkorea-logo.png' +import logoWhite from '@/assets/imarketkorea-logo-white.png' + +export type LogoVariant = 'color' | 'white' +export type LogoSize = 'sm' | 'md' | 'lg' + +const sources: Record = { + color: logoColor, // 브랜드 블루 심볼 — 밝은 배경용 + white: logoWhite, // 화이트 심볼 — 어두운 배경용 +} + +// 심볼 높이에 맞춰 텍스트도 함께 스케일한다. +const sizes: Record = { + sm: { img: 'h-6', text: 'text-base', gap: 'gap-1.5' }, + md: { img: 'h-8', text: 'text-xl', gap: 'gap-2' }, + lg: { img: 'h-10', text: 'text-2xl', gap: 'gap-2.5' }, +} + +export interface LogoProps extends Omit, 'children'> { + variant?: LogoVariant + size?: LogoSize + /** 워드마크(iMarket Korea) 텍스트 노출 여부 */ + withText?: boolean + /** 심볼 이미지 alt */ + alt?: string +} + +export function Logo({ + variant = 'color', + size = 'md', + withText = true, + alt = 'iMarket Korea', + className, + ...props +}: LogoProps) { + const s = sizes[size] + + return ( +
+ {withText + {withText && ( + + iMarket Korea + + )} +
+ ) +} + +export default Logo diff --git a/front/src/component/cn.ts b/front/src/components/cn.ts similarity index 100% rename from front/src/component/cn.ts rename to front/src/components/cn.ts diff --git a/front/src/component/index.ts b/front/src/components/index.ts similarity index 66% rename from front/src/component/index.ts rename to front/src/components/index.ts index 5221b7f..c47bd32 100644 --- a/front/src/component/index.ts +++ b/front/src/components/index.ts @@ -2,3 +2,5 @@ export { cn } from './cn' export { Button } from './Button' export type { ButtonProps, ButtonVariant, ButtonSize } from './Button' export { Input } from './Input' +export { Logo } from './Logo' +export type { LogoProps, LogoVariant } from './Logo'