Add classes to post and comment repy textareas

This commit is contained in:
Zetaphor 2023-06-16 14:10:56 -03:00
parent a5dc5c0b3f
commit 3ca2bce9f0
3 changed files with 5 additions and 1 deletions

View file

@ -21,6 +21,7 @@ interface CommentFormProps {
onReplyCancel?(): void; onReplyCancel?(): void;
allLanguages: Language[]; allLanguages: Language[];
siteLanguages: number[]; siteLanguages: number[];
containerClass?: string;
onUpsertComment(form: EditComment | CreateComment): void; onUpsertComment(form: EditComment | CreateComment): void;
} }
@ -40,7 +41,7 @@ export class CommentForm extends Component<CommentFormProps, any> {
: undefined; : undefined;
return ( return (
<div className="mb-3"> <div className={["mb-3", this.props.containerClass].join(" ")}>
{UserService.Instance.myUserInfo ? ( {UserService.Instance.myUserInfo ? (
<MarkdownTextArea <MarkdownTextArea
initialContent={initialContent} initialContent={initialContent}

View file

@ -400,6 +400,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
focus focus
allLanguages={this.props.allLanguages} allLanguages={this.props.allLanguages}
siteLanguages={this.props.siteLanguages} siteLanguages={this.props.siteLanguages}
containerClass="comment-comment-container"
onUpsertComment={this.props.onEditComment} onUpsertComment={this.props.onEditComment}
/> />
)} )}
@ -1143,6 +1144,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
focus focus
allLanguages={this.props.allLanguages} allLanguages={this.props.allLanguages}
siteLanguages={this.props.siteLanguages} siteLanguages={this.props.siteLanguages}
containerClass="comment-comment-container"
onUpsertComment={this.props.onCreateComment} onUpsertComment={this.props.onCreateComment}
/> />
)} )}

View file

@ -384,6 +384,7 @@ export class Post extends Component<any, PostState> {
disabled={res.post_view.post.locked} disabled={res.post_view.post.locked}
allLanguages={this.state.siteRes.all_languages} allLanguages={this.state.siteRes.all_languages}
siteLanguages={this.state.siteRes.discussion_languages} siteLanguages={this.state.siteRes.discussion_languages}
containerClass="post-comment-container"
onUpsertComment={this.handleCreateComment} onUpsertComment={this.handleCreateComment}
finished={this.state.finished.get(0)} finished={this.state.finished.get(0)}
/> />