mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
Indent comment only
This commit is contained in:
@@ -22,6 +22,7 @@ it("renders username and body", () => {
|
||||
body: "Woof",
|
||||
createdAt: "1995-12-17T03:24:00.000Z",
|
||||
},
|
||||
indentLevel: 1,
|
||||
};
|
||||
|
||||
const wrapper = shallow(<CommentContainerN {...props} />);
|
||||
@@ -41,6 +42,7 @@ it("renders body only", () => {
|
||||
body: "Woof",
|
||||
createdAt: "1995-12-17T03:24:00.000Z",
|
||||
},
|
||||
indentLevel: 1,
|
||||
};
|
||||
|
||||
const wrapper = shallow(<CommentContainerN {...props} />);
|
||||
|
||||
@@ -14,6 +14,7 @@ import PermalinkButtonContainer from "./PermalinkButtonContainer";
|
||||
interface InnerProps {
|
||||
comment: CommentData;
|
||||
asset: AssetData;
|
||||
indentLevel?: number;
|
||||
}
|
||||
|
||||
interface State {
|
||||
|
||||
@@ -39,6 +39,7 @@ export class ReplyListContainer extends React.Component<InnerProps> {
|
||||
onShowAll={this.showAll}
|
||||
hasMore={this.props.relay.hasMore()}
|
||||
disableShowAll={this.state.disableShowAll}
|
||||
indentLevel={1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
exports[`renders body only 1`] = `
|
||||
<React.Fragment>
|
||||
<Comment
|
||||
<IndentedComment
|
||||
author={
|
||||
Object {
|
||||
"username": null,
|
||||
@@ -22,13 +22,14 @@ exports[`renders body only 1`] = `
|
||||
</React.Fragment>
|
||||
}
|
||||
id="comment-id"
|
||||
indentLevel={1}
|
||||
/>
|
||||
</React.Fragment>
|
||||
`;
|
||||
|
||||
exports[`renders username and body 1`] = `
|
||||
<React.Fragment>
|
||||
<Comment
|
||||
<IndentedComment
|
||||
author={
|
||||
Object {
|
||||
"username": "Marvin",
|
||||
@@ -48,6 +49,7 @@ exports[`renders username and body 1`] = `
|
||||
</React.Fragment>
|
||||
}
|
||||
id="comment-id"
|
||||
indentLevel={1}
|
||||
/>
|
||||
</React.Fragment>
|
||||
`;
|
||||
|
||||
@@ -37,6 +37,7 @@ exports[`renders correctly 1`] = `
|
||||
]
|
||||
}
|
||||
disableShowAll={false}
|
||||
indentLevel={1}
|
||||
onShowAll={[Function]}
|
||||
/>
|
||||
`;
|
||||
@@ -81,6 +82,7 @@ exports[`when has more replies renders hasMore 1`] = `
|
||||
}
|
||||
disableShowAll={false}
|
||||
hasMore={true}
|
||||
indentLevel={1}
|
||||
onShowAll={[Function]}
|
||||
/>
|
||||
`;
|
||||
@@ -123,6 +125,7 @@ exports[`when has more replies when showing all disables show all button 1`] = `
|
||||
}
|
||||
disableShowAll={true}
|
||||
hasMore={true}
|
||||
indentLevel={1}
|
||||
onShowAll={[Function]}
|
||||
/>
|
||||
`;
|
||||
@@ -165,6 +168,7 @@ exports[`when has more replies when showing all enable show all button after loa
|
||||
}
|
||||
disableShowAll={false}
|
||||
hasMore={true}
|
||||
indentLevel={1}
|
||||
onShowAll={[Function]}
|
||||
/>
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user