empty.tsx 583 B

1234567891011121314151617181920212223
  1. "use client";
  2. import { type ComponentRenderProps } from "@json-render/react";
  3. export function Empty({ element }: ComponentRenderProps) {
  4. const { title, description } = element.props as {
  5. title: string;
  6. description?: string | null;
  7. };
  8. return (
  9. <div style={{ textAlign: "center", padding: "40px 20px" }}>
  10. <h3 style={{ margin: "0 0 8px", fontSize: 16, fontWeight: 600 }}>
  11. {title}
  12. </h3>
  13. {description && (
  14. <p style={{ margin: 0, fontSize: 14, color: "var(--muted)" }}>
  15. {description}
  16. </p>
  17. )}
  18. </div>
  19. );
  20. }