module IHP.IDE.SchemaDesigner.View.Schema.Error where

import IHP.ViewPrelude
import IHP.IDE.SchemaDesigner.Types
import IHP.IDE.ToolServer.Types
import IHP.IDE.ToolServer.Layout
import IHP.IDE.SchemaDesigner.View.Layout

data ErrorView = ErrorView
    { ErrorView -> ByteString
error :: ByteString
    }

instance View ErrorView where
    html :: ErrorView -> Html
html ErrorView { ByteString
error :: ByteString
$sel:error:ErrorView :: ErrorView -> ByteString
.. } = [hsx|
        <div class="bg-white visual-error">
            <pre>{error}</pre>
        </div>
    |]