๐Ÿชน

Empty State (๋นˆ ์ƒํƒœ)

4๊ฐ€์ง€ ์ผ€์ด์Šค

  • First-time: ์‹ ๊ทœ ์‚ฌ์šฉ์ž๊ฐ€ ์ฒ˜์Œ ๋“ค์–ด์™”์„ ๋•Œ ๋ณด์—ฌ์ค˜์š”. ๊ฐ€์ด๋“œ ์นด๋“œ์™€ ์ฒซ ์•ก์…˜ CTA๋กœ ๊ตฌ์„ฑํ•ฉ๋‹ˆ๋‹ค.
  • No-results: ๊ฒ€์ƒ‰์ด๋‚˜ ํ•„ํ„ฐ ๊ฒฐ๊ณผ๊ฐ€ 0๊ฑด์ผ ๋•Œ ๋„์›๋‹ˆ๋‹ค. ๊ฒ€์ƒ‰์–ด ๋ณ€๊ฒฝ์ด๋‚˜ ํ•„ํ„ฐ ์ดˆ๊ธฐํ™”๋ฅผ ์ œ์•ˆํ•ด์š”.
  • No-permission: ๊ถŒํ•œ์ด ์—†์„ ๋•Œ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค. ๊ถŒํ•œ ์š”์ฒญ์ด๋‚˜ ๋‹ค๋ฅธ ํ™”๋ฉด ์ด๋™์„ ์ œ์•ˆํ•ด์š”.
  • Error-recovery: ๋ฐ์ดํ„ฐ ๋กœ๋“œ์— ์‹คํŒจํ–ˆ์„ ๋•Œ ๋„์›Œ์š”. '๋‹ค์‹œ ์‹œ๋„' ๋ฒ„ํŠผ๊ณผ ์ง€์› ์ฑ„๋„ ๋งํฌ๋ฅผ ํ•จ๊ป˜ ๋‘ก๋‹ˆ๋‹ค.

์žฌ์‚ฌ์šฉ ์ปดํฌ๋„ŒํŠธ ๊ณจ๊ฒฉ

type EmptyStateProps = { icon: LucideIcon title: string description?: string action?: React.ReactNode } export function EmptyState({ icon: Icon, title, description, action }: EmptyStateProps) { return ( <div role="status" aria-live="polite" className="flex flex-col items-center gap-3 py-16 text-center"> <Icon className="h-14 w-14 text-muted-foreground/60" /> <p className="text-base font-semibold">{title}</p> {description && <p className="text-sm text-muted-foreground">{description}</p>} {action && <div className="mt-2">{action}</div>} </div> ) }