mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-24 15:47:08 +00:00
Allow multiple errors and dismissing errors
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
export function ErrorPanel({ error }: { error: string }) {
|
||||
import { Octicon } from './Octicon'
|
||||
|
||||
type ErrorPanelProps = {
|
||||
error: string,
|
||||
onDismiss?: () => unknown,
|
||||
}
|
||||
export function ErrorPanel({ error, onDismiss }: ErrorPanelProps) {
|
||||
return <div class="error">
|
||||
{onDismiss && <div class="error-dismiss" onClick={onDismiss}>{Octicon.x}</div>}
|
||||
<h3>{error}</h3>
|
||||
<p>You can report this as a bug <a href="https://github.com/misode/misode.github.io/issues/new" target="_blank">on GitHub</a></p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user