File size: 1,012 Bytes
e2d3383
 
 
 
273b642
e2d3383
273b642
 
 
 
 
 
 
 
 
e2d3383
 
 
 
 
 
 
 
 
 
 
273b642
 
 
 
 
 
 
 
 
 
 
 
e2d3383
273b642
e2d3383
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
interface LoadingProps {
  message?: string
}

export function LoadingSpinner({ message = 'Loading…' }: LoadingProps) {
  return (
    <div
      style={{
        padding: '60px 0',
        fontFamily: '"Space Grotesk", system-ui, sans-serif',
        fontSize: '13px',
        color: '#8d909e',
      }}
    >
      {message}
    </div>
  )
}

interface ErrorProps {
  message?: string
  onRetry?: () => void
}

export function ErrorState({ message = 'Failed to load data', onRetry }: ErrorProps) {
  return (
    <div style={{ padding: '60px 0' }}>
      <div className="eyebrow" style={{ color: '#c71f48' }}>Error</div>
      <p
        style={{
          fontFamily: '"Source Serif 4", Georgia, serif',
          fontSize: '18px',
          color: '#1b1e2d',
          marginTop: '8px',
        }}
      >
        {message}
      </p>
      {onRetry && (
        <button onClick={onRetry} className="btn-secondary" style={{ marginTop: '12px' }}>
          Retry
        </button>
      )}
    </div>
  )
}