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

23 lines
No EOL
581 B
TypeScript

import { faCircleExclamation } from "@fortawesome/free-solid-svg-icons";
import { FestaIcon } from "./FestaIcon";
type ErrorInlineProps = {
error: JSON,
text?: string
}
export function ErrorInline(props: ErrorInlineProps) {
return (
<span className="error error-inline negative">
<FestaIcon icon={faCircleExclamation} />
&nbsp;
<span>
{props.text}
</span>
&nbsp;
<code lang="json">
{JSON.stringify(props.error)}
</code>
</span>
)
}