Skip to content

Commit 8f1e4e3

Browse files
committed
Use Polaris BlockStack for error overlay body
1 parent fc974fb commit 8f1e4e3

File tree

1 file changed

+15
-12
lines changed
  • packages/theme/src/cli/utilities/theme-environment/hot-reload

1 file changed

+15
-12
lines changed

packages/theme/src/cli/utilities/theme-environment/hot-reload/error-page.ts

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,21 @@ export function getErrorPage(options: {title: string; header: string; errors: Er
6363
class="Polaris-BlockStack"
6464
style="--pc-block-stack-order:column;--pc-block-stack-gap-xs:var(--p-space-200)"
6565
>
66-
${options.errors
67-
.map(
68-
(error) => `
69-
<div>
70-
<span class="Polaris-Text--root Polaris-Text--bodyMd">
71-
${error.file ? `<p class="error-file">${error.file}</p>` : ''}
72-
<p class="error-message">${error.message}${error.code}</p>
73-
</span>
74-
</div>
75-
`,
76-
)
77-
.join('')}
66+
<div
67+
class="Polaris-BlockStack"
68+
style="--pc-block-stack-order:column;--pc-block-stack-gap-xs:var(--p-space-500)"
69+
>
70+
${options.errors
71+
.map(
72+
(error) => `
73+
<span class="Polaris-Text--root Polaris-Text--headingSm">${error.message}</span>
74+
<span class="Polaris-Text--root Polaris-Text--bodyLg"
75+
>- ${error.code}</span
76+
>
77+
`,
78+
)
79+
.join('')}
80+
</div>
7881
</div>
7982
</div>
8083
</div>

0 commit comments

Comments
 (0)