PagePlaceholder.tsx 1.38 KB
import type { ReactNode } from 'react';
import { brandAccent } from '@/theme/themeConfig';

interface PagePlaceholderProps {
  title: string;
  description?: string;
  extra?: ReactNode;
}

/** 极简占位页:框架阶段先用,后续逐个替换为真实页面 */
export default function PagePlaceholder({ title, description, extra }: PagePlaceholderProps) {
  return (
    <div
      style={{
        flex: 1,
        minHeight: 0,
        display: 'flex',
        flexDirection: 'column',
        alignItems: 'center',
        justifyContent: 'center',
        background: '#fff',
        borderRadius: 12,
        border: '1px dashed #E2E7EF',
      }}
    >
      <div
        style={{
          width: 56,
          height: 56,
          borderRadius: 16,
          background: 'linear-gradient(135deg, rgba(43,92,230,.12), rgba(91,141,239,.18))',
          display: 'flex',
          alignItems: 'center',
          justifyContent: 'center',
          fontSize: 24,
          fontWeight: 700,
          color: brandAccent,
          marginBottom: 16,
        }}
      >
        {title.slice(0, 1)}
      </div>
      <div style={{ fontSize: 18, fontWeight: 600, color: '#1D2533' }}>{title}</div>
      {description && (
        <div style={{ marginTop: 8, fontSize: 13, color: '#8A94A6' }}>{description}</div>
      )}
      {extra && <div style={{ marginTop: 24 }}>{extra}</div>}
    </div>
  );
}