Skip to content

Commit

Permalink
Merge pull request #346 from h3poteto/iss-343
Browse files Browse the repository at this point in the history
refs #343 Add cancel button for reply
  • Loading branch information
h3poteto authored Jan 30, 2023
2 parents 4d4d10b + c5d70ca commit b7f0a22
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/compose/Status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ const Status: React.FC<Props> = props => {
</Button>
</Whisper>
</Form.Group>
<Form.Group controlId="actions">
<Form.Group controlId="actions" style={{ marginBottom: '4px' }}>
<ButtonToolbar>
<Input name="attachments" type="file" style={{ display: 'none' }} ref={uploaderRef} onChange={fileChanged} />
<Button appearance="subtle" onClick={selectFile}>
Expand All @@ -270,12 +270,12 @@ const Status: React.FC<Props> = props => {
</ButtonToolbar>
</Form.Group>
{formValue.attachments?.length > 0 && (
<Form.Group controlId="nsfw">
<Form.Group controlId="nsfw" style={{ marginBottom: '4px' }}>
<Form.Control name="nsfw" accepter={Toggle} checkedChildren="Sensitive" unCheckedChildren="Not sensitive" />
</Form.Group>
)}

<Form.Group controlId="attachments-preview">
<Form.Group controlId="attachments-preview" style={{ marginBottom: '4px' }}>
<div>
{formValue.attachments?.map((media, index) => (
<div key={index} style={{ position: 'relative' }}>
Expand Down Expand Up @@ -304,6 +304,7 @@ const Status: React.FC<Props> = props => {
</Form.Group>
<Form.Group>
<ButtonToolbar style={{ justifyContent: 'flex-end' }}>
{props.in_reply_to && <Button onClick={clear}>Cancel</Button>}
<Button appearance="primary" type="submit" onClick={handleSubmit} loading={loading}>
Post
</Button>
Expand Down

0 comments on commit b7f0a22

Please sign in to comment.