Files
textbee/web/components/shared/empty-state.tsx
isra el 50d0902535 refactor: make transitions and entrance animations subtle
The entrance motion added in the previous rounds was too loud. Softened at
the token level and removed at the call sites where it replayed repeatedly.

Tokens (styles/main.css):
- fade-in 0.3s -> 0.15s
- fade-in-up 0.4s / 8px rise -> 0.2s / 3px rise
- check-pop 0.35s / 0.6-1.15-1 overshoot -> 0.2s / 0.92-1.02-1

Call sites, which mattered more than the token tuning:
- message-card: dropped animate-fade-in. Message history refetches on filter
  change, pagination and auto-refresh, so every row replayed its fade on
  every tick.
- get-started: dropped the per-index animationDelay stagger. The card polls
  every 10s, so any remount replayed a cascading six-row stagger.
- empty-state: dropped animate-fade-in from a static block.
- community-links: hover:scale-105 -> border and shadow change.
- onboarding progress bars: duration-500 -> duration-300.

Radix enter/exit animations on dialogs, dropdowns, selects, toasts and the
accordion are unchanged: they are short, conventional and expected. The
prefers-reduced-motion guard is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-18 19:52:29 +03:00

21 lines
693 B
TypeScript

import type { ComponentType } from 'react'
type EmptyStateProps = {
icon: ComponentType<{ className?: string }>
title: string
hint?: string
}
// Shared empty-state placeholder: icon in a muted circle, title, optional hint.
export default function EmptyState({ icon: Icon, title, hint }: EmptyStateProps) {
return (
<div className='flex flex-col items-center justify-center gap-2 py-12 text-center'>
<div className='rounded-full bg-muted p-3'>
<Icon className='h-6 w-6 text-muted-foreground' />
</div>
<p className='text-sm font-medium text-foreground'>{title}</p>
{hint && <p className='text-xs text-muted-foreground'>{hint}</p>}
</div>
)
}