1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-23 07:04:22 +00:00
festa/components/ErrorBlock.tsx

27 lines
672 B
TypeScript
Raw Normal View History

2022-06-02 02:26:52 +00:00
import { faCircleExclamation } from "@fortawesome/free-solid-svg-icons";
import { FestaIcon } from "./FestaIcon";
type ErrorBlockProps = {
error: JSON,
text: string
2022-06-02 02:26:52 +00:00
}
export function ErrorBlock(props: ErrorBlockProps) {
return (
<div className="error error-block negative">
<p>
2022-06-03 01:56:43 +00:00
<FestaIcon icon={faCircleExclamation} />
2022-06-02 02:26:52 +00:00
&nbsp;
<span>
{props.text}
2022-06-02 02:26:52 +00:00
</span>
</p>
<pre>
<code lang="json">
{JSON.stringify(props.error, undefined, 4)}
</code>
</pre>
</div>
)
}