@boomerang-io/carbon-addons-boomerang-react
Version:
Carbon Addons for Boomerang apps
24 lines (21 loc) • 1.34 kB
JavaScript
import React from 'react';
import NotFoundErrorBackground from './NotFoundErrorBackground.js';
import LochGraphic from './GraphicLoch/GraphicLoch.js';
import ErrorPage from '../ErrorPage/ErrorPage.js';
import ErrorPageCore from '../ErrorPageCore/ErrorPageCore.js';
import { prefix } from '../../internal/settings.js';
/*
IBM Confidential
694970X, 69497O0
© Copyright IBM Corp. 2022, 2024
*/
function Error404(props) {
const { theme = "core" } = props;
if (theme === "boomerang") {
const { header = "404 - Page Not Found", title = "Crikey. Something seems to have swam off with this page.", message = "Try refreshing, or contact the local authorities.", graphic = React.createElement(LochGraphic, null), ...rest } = props;
return React.createElement(ErrorPage, { header: header, title: title, message: message, graphic: graphic, ...rest });
}
const { header = "404 Page Not Found", title = "We spaced out and couldn’t find your page.", message = "Try refreshing, or contact the local authorities.", graphic = React.createElement(NotFoundErrorBackground, { className: `${prefix}--bmrg-error-page-core__background` }), ...rest } = props;
return React.createElement(ErrorPageCore, { header: header, title: title, message: message, graphic: graphic, ...rest });
}
export { Error404 as default };