Skip to content

Commit

Permalink
Merge pull request #2153 from daostack/cw-2102-edit-message-remove-ow…
Browse files Browse the repository at this point in the history
…ner-name

Edit message issues #2102
  • Loading branch information
andreymikhadyuk authored Oct 5, 2023
2 parents 6dce881 + e51b594 commit 8cd7eaf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,12 @@ $phone-breakpoint: 415px;
padding: 0.5rem 1rem;
}

.ownerName {
font-size: $xsmall;
font-weight: 600;
color: $secondary-blue;
margin-bottom: 0.5rem;
}

.input {
resize: none;
width: 100%;
border-width: 0;
outline: 0;
padding-right: 1.75rem;
}

.buttonContainer {
Expand Down
16 changes: 8 additions & 8 deletions src/shared/components/Chat/EditMessageInput/EditMessageInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ import {
checkIsUserDiscussionMessage,
DiscussionMessage,
} from "@/shared/models";
import { BaseTextEditor, Button, ButtonVariant } from "@/shared/ui-kit";
import {
BaseTextEditor,
Button,
ButtonVariant,
TextEditorSize,
} from "@/shared/ui-kit";
import { parseStringToTextEditorValue } from "@/shared/ui-kit/TextEditor/utils";
import { emptyFunction, getUserName } from "@/shared/utils";
import { emptyFunction } from "@/shared/utils";
import styles from "./EditMessageInput.module.scss";

interface Props {
Expand Down Expand Up @@ -104,12 +109,6 @@ export default function EditMessageInput({

return (
<div className={styles.container}>
<div className={styles.ownerName}>
{checkIsUserDiscussionMessage(discussionMessage)
? getUserName(discussionMessage.owner)
: "System"}
</div>

<BaseTextEditor
className={styles.input}
emojiPickerContainerClassName={styles.pickerContainer}
Expand All @@ -119,6 +118,7 @@ export default function EditMessageInput({
users={users}
shouldReinitializeEditor={false}
onClearFinished={emptyFunction}
size={TextEditorSize.Auto}
/>

<div className={styles.buttonContainer}>
Expand Down
2 changes: 1 addition & 1 deletion src/shared/ui-kit/TextEditor/BaseTextEditor.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
position: relative;
width: 100%;
height: 100%;
}
}

0 comments on commit 8cd7eaf

Please sign in to comment.