Skip to content

Commit c7c56e8

Browse files
committed
Use Polaris BlockStack for error overlay body
1 parent 757658a commit c7c56e8

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
@@ -62,18 +62,21 @@ export function getErrorPage(options: {title: string; header: string; errors: Er
6262
class="Polaris-BlockStack"
6363
style="--pc-block-stack-order:column;--pc-block-stack-gap-xs:var(--p-space-200)"
6464
>
65-
${options.errors
66-
.map(
67-
(error) => `
68-
<div>
69-
<span class="Polaris-Text--root Polaris-Text--bodyMd">
70-
${error.file ? `<p class="error-file">${error.file}</p>` : ''}
71-
<p class="error-message">${error.message}${error.code}</p>
72-
</span>
73-
</div>
74-
`,
75-
)
76-
.join('')}
65+
<div
66+
class="Polaris-BlockStack"
67+
style="--pc-block-stack-order:column;--pc-block-stack-gap-xs:var(--p-space-500)"
68+
>
69+
${options.errors
70+
.map(
71+
(error) => `
72+
<span class="Polaris-Text--root Polaris-Text--headingSm">${error.message}</span>
73+
<span class="Polaris-Text--root Polaris-Text--bodyLg"
74+
>- ${error.code}</span
75+
>
76+
`,
77+
)
78+
.join('')}
79+
</div>
7780
</div>
7881
</div>
7982
</div>

0 commit comments

Comments
 (0)