1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-23 07:04:22 +00:00
festa/components/errors/ErrorBlock.tsx
2022-06-04 05:13:19 +02:00

28 lines
No EOL
725 B
TypeScript

import { faCircleExclamation } from "@fortawesome/free-solid-svg-icons";
import { FestaIcon } from "../extensions/FestaIcon";
type ErrorBlockProps = {
error: Error,
text: string
}
export function ErrorBlock(props: ErrorBlockProps) {
return (
<div className="error error-block negative">
<p>
<FestaIcon icon={faCircleExclamation} />
&nbsp;
<span>
{props.text}
</span>
</p>
<pre>
<code>
<b>{props.error.name}</b>
:&nbsp;
{props.error.message}
</code>
</pre>
</div>
)
}