UNPKG

analytica-frontend-lib

Version:

Repositório público dos componentes utilizados nas plataformas da Analytica Ensino

59 lines (56 loc) 2.01 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; /** * Props interface for the NotFound component * * @interface NotFoundProps * @property {string} [title] - Custom title text (default: "Página não encontrada") * @property {string} [description] - Custom description text * @property {string} [buttonText] - Custom button text (default: "Voltar") * @property {() => void} [onButtonClick] - Callback function for button click * @property {string} [className] - Additional CSS classes for the container * @property {'404' | '500' | 'custom'} [errorType] - Type of error to display (default: '404') * @property {string} [customErrorCode] - Custom error code when errorType is 'custom' */ interface NotFoundProps { title?: string; description?: string; buttonText?: string; onButtonClick?: () => void; className?: string; errorType?: '404' | '500' | 'custom'; customErrorCode?: string; } /** * NotFound component for displaying error pages * * A reusable component for displaying 404, 500, or custom error pages * with configurable content and navigation button. * * @param {NotFoundProps} props - The component props * @returns {JSX.Element} The NotFound component * * @example * ```typescript * // Basic 404 page * <NotFound onButtonClick={() => navigate('/dashboard')} /> * * // Custom error page * <NotFound * errorType="500" * title="Erro interno do servidor" * description="Algo deu errado. Tente novamente mais tarde." * buttonText="Tentar novamente" * onButtonClick={() => window.location.reload()} * /> * * // Custom error code * <NotFound * errorType="custom" * customErrorCode="403" * title="Acesso negado" * description="Você não tem permissão para acessar esta página." * /> * ``` */ declare const NotFound: ({ title, description, buttonText, onButtonClick, className, errorType, customErrorCode, }: NotFoundProps) => react_jsx_runtime.JSX.Element; export { type NotFoundProps, NotFound as default };