Skip to content

Commit 40d3ec2

Browse files
committed
Simplify Post dialog copy; show errors in a red alert box
1 parent e91b316 commit 40d3ec2

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

src/write/WritePortal.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -626,13 +626,16 @@ export default function WritePortal({ authors, topics, repoUrl, contactEmail }:
626626
</>
627627
) : (
628628
<>
629-
<h3>Post to GitHub</h3>
629+
<h3>Ready to post?</h3>
630630
<p>
631-
We’ll open a pull request with your post — images and all. After it’s created,
632-
comment your author details (name, short bio, links) so a maintainer can review
633-
and publish.
631+
We’ll submit your article via GitHub. Once it’s created, just add your name on the
632+
request to claim it — a maintainer takes it from there.
634633
</p>
635-
{publishError && <p className="write-modal-error">{publishError}</p>}
634+
{publishError && (
635+
<p className="write-modal-error" role="alert">
636+
{publishError}
637+
</p>
638+
)}
636639
<div className="write-modal-actions">
637640
<button
638641
type="button"

src/write/editor/editor-theme.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,14 @@
193193
border-color: var(--accent);
194194
}
195195
.write-modal-error {
196-
color: var(--accent);
196+
margin: 14px 0 0 !important;
197+
padding: 10px 12px;
197198
font-size: 13px;
198-
margin: 12px 0 0 !important;
199+
color: #e5484d;
200+
background: color-mix(in srgb, #e5484d 12%, transparent);
201+
border: 1px solid color-mix(in srgb, #e5484d 40%, transparent);
202+
border-left: 3px solid #e5484d;
203+
border-radius: 8px;
199204
}
200205
.write-modal-actions {
201206
display: flex;

0 commit comments

Comments
 (0)