diff --git a/README.md b/README.md index 784e497..db48055 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,9 @@ urlpatterns = [ ] ``` -Then to render the widget for an object, include the CSS and JS file while adding a `div.comment-viewer` element to your DOM: +Then to render the widget for an object, include the CSS and JS file while adding a : +- `div.comment-viewer` element to your DOM if you want to display one comment (simple view). +- `div.comment-thread-viewer` element to your DOM if you want to display a paginated list of all comments (thread view). ```html {% block style %} @@ -102,7 +104,10 @@ Then to render the widget for an object, include the CSS and JS file while addin {% endblock style %} {% block content %} +
+ + {% endblock %} {% block script %} diff --git a/frontend/CommentThread.stories.ts b/frontend/CommentViewer.stories.ts similarity index 77% rename from frontend/CommentThread.stories.ts rename to frontend/CommentViewer.stories.ts index 4e46fd7..2a3da43 100644 --- a/frontend/CommentThread.stories.ts +++ b/frontend/CommentViewer.stories.ts @@ -24,24 +24,24 @@ * */ -import CommentThread from './CommentThread.vue'; +import CommentViewer from './CommentViewer.vue'; import fetchMock from 'fetch-mock'; import type {Meta, StoryFn} from "@storybook/vue3"; import type {EntriesResponse} from "./interfaces"; export default { - title: 'CommentThread', - component: CommentThread, + title: 'CommentViewer', + component: CommentViewer, } as Meta; -const Template: StoryFn