Skip to content

Commit 42e5c8b

Browse files
author
Ashi Krishnan
committed
Fix spacing form spacing and alignment.
Co-Authored-By: [email protected]
1 parent f813283 commit 42e5c8b

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

preview-src/comment.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export const CommentBody = ({ bodyHTML, body }: Embodied) =>
130130

131131
export function AddComment({ pendingCommentText }: PullRequest) {
132132
const { updatePR, comment } = useContext(PullRequestContext);
133-
return <form id='comment-form' className='comment-form' onSubmit={onSubmit}>
133+
return <form id='comment-form' className='comment-form main-comment-form' onSubmit={onSubmit}>
134134
<textarea id='comment-textarea'
135135
name='body'
136136
onInput={({ target }) =>

preview-src/header.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ function Title({ title, number, url, canEdit, isCurrentlyCheckedOut }: Partial<P
5454
}
5555
}
5656
>
57-
<textarea name='text' defaultValue={currentTitle}></textarea>
57+
<textarea name='text' style={{ width: '100%' }} defaultValue={currentTitle}></textarea>
5858
<div className='form-actions'>
59-
<button className='secondary'>Cancel</button>
59+
<button className='secondary'
60+
onClick={() => setEditMode(false)}>Cancel</button>
6061
<input type='submit' value='Update' />
6162
</div>
6263
</form>

preview-src/index.css

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -636,19 +636,18 @@ textarea:focus {
636636
padding: 5px 0;
637637
}
638638

639-
.editing-form .form-actions button {
640-
margin-left: 5px;
641-
}
642-
643639
.reply-button {
644640
margin-left: auto;
645641
margin-right: 0 !important;
646642
}
647643

648644
.form-actions {
645+
display: flex;
646+
}
647+
648+
.main-comment-form > .form-actions {
649649
padding-top: 10px;
650650
margin-bottom: 10px;
651-
display: flex;
652651
}
653652

654653
body button:disabled,
@@ -1044,10 +1043,9 @@ code {
10441043
}
10451044

10461045
.title-editing-form {
1047-
min-width: 30%;
1046+
flex-grow: 1;
10481047
}
10491048

1050-
.title-editing-form > .form-actions > button {
1049+
.title-editing-form > .form-actions {
10511050
margin-left: 0;
1052-
margin-right: 9px;
10531051
}

0 commit comments

Comments
 (0)