Files
fn_registry/frontend/functions/ui/error_page.tsx
T
egutierrez 2d108c295a refactor: migrate frontend from shadcn/Tailwind to Mantine v9
Reescribe todos los componentes UI para usar Mantine v9 en lugar de shadcn/Tailwind.
Elimina cn(), CVA, components.json, theme_provider custom y globals.css con Tailwind.
Añade 25+ componentes nuevos (AppShell, AuthForm, DatePickerInput, Dropzone, etc.)
y MantineProvider como wrapper estándar del sistema de temas.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 23:46:44 +02:00

57 lines
1.4 KiB
TypeScript

import * as React from 'react'
import { Button, Container, Group, Stack, Text, Title } from '@mantine/core'
interface ErrorPageConfig {
/** Código de error (404, 500, 403, etc.) */
code?: number | string
/** Título del error */
title?: string
/** Descripción del error */
description?: string
/** Texto del botón de acción */
actionLabel?: string
/** Callback del botón */
onAction?: () => void
/** Acciones extra además del botón principal */
extraActions?: React.ReactNode
}
function ErrorPage({
code = 404,
title = 'Page not found',
description = 'The page you are looking for does not exist. You may have mistyped the address, or the page has been moved to another URL.',
actionLabel = 'Go back to home',
onAction,
extraActions,
}: ErrorPageConfig) {
return (
<Container py={80}>
<Stack align="center" gap="md">
<Text
fz={120}
fw={900}
c="dimmed"
style={{ lineHeight: 1, opacity: 0.25 }}
>
{code}
</Text>
<Title order={2} ta="center">
{title}
</Title>
<Text c="dimmed" size="lg" ta="center" maw={500}>
{description}
</Text>
<Group mt="md">
<Button size="md" onClick={onAction}>
{actionLabel}
</Button>
{extraActions}
</Group>
</Stack>
</Container>
)
}
export { ErrorPage }
export type { ErrorPageConfig }