← All changes
|
js/components/EditMenu/SnippetForm/page/Notices.tsx
+6
-1
4.0.0-beta.1
→
trunk
View file →
| @@ -60,9 +60,13 @@ | ||
| 60 | 60 | const showCodeErrorNotice = 'sidebar' === placement && !snippet.code_error_trace |
| 61 | 61 | |
| 62 | 62 | return <> |
| 63 | 63 | {showCurrentNotice && currentNotice |
| 64 | - ? <DismissibleNotice className={`${currentNotice[0]} code-snippets-notice`} onDismiss={() => setCurrentNotice(undefined)}> | |
| 64 | + ? <DismissibleNotice | |
| 65 | + className={`${currentNotice[0]} code-snippets-notice`} | |
| 66 | + type={'error' === currentNotice[0] ? 'error' : undefined} | |
| 67 | + onDismiss={() => setCurrentNotice(undefined)} | |
| 68 | + > | |
| 65 | 69 | <p>{renderNoticeLine(currentNotice[1])}</p> |
| 66 | 70 | {currentNotice[DESCRIPTION_INDEX] |
| 67 | 71 | ? <p>{renderNoticeLine(currentNotice[DESCRIPTION_INDEX])}</p> |
| 68 | 72 | : null} |
| @@ -74,8 +78,9 @@ | ||
| 74 | 78 | |
| 75 | 79 | {showCodeErrorNotice && !currentNotice && snippet.code_error |
| 76 | 80 | ? <DismissibleNotice |
| 77 | 81 | className="notice-error" |
| 82 | + type="error" | |
| 78 | 83 | onDismiss={() => setSnippet(previous => ({ ...previous, code_error: null, code_error_trace: null }))} |
| 79 | 84 | > |
| 80 | 85 | <p> |
| 81 | 86 | <strong>{sprintf( |