1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-10-16 23:17:26 +00:00
festa/components/ErrorBlock.tsx

27 lines
No EOL
672 B
TypeScript

import { faCircleExclamation } from "@fortawesome/free-solid-svg-icons";
import { FestaIcon } from "./FestaIcon";
type ErrorBlockProps = {
error: JSON,
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 lang="json">
{JSON.stringify(props.error, undefined, 4)}
</code>
</pre>
</div>
)
}