@1d1s/design-system 0.2.30 → 0.2.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CommentThread/CommentThread.d.ts +27 -0
- package/dist/components/CommentThread/CommentThread.stories.d.ts +9 -0
- package/dist/components/CommentThread/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.es.js +3411 -3141
- package/dist/index.umd.js +8 -8
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CommentAuthor {
|
|
3
|
+
id: string;
|
|
4
|
+
nickname: string;
|
|
5
|
+
profileImageUrl?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CommentNode {
|
|
8
|
+
id: string;
|
|
9
|
+
content: string;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
author: CommentAuthor;
|
|
12
|
+
replies?: CommentNode[];
|
|
13
|
+
isAuthor?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface CommentThreadProps {
|
|
16
|
+
comments: CommentNode[];
|
|
17
|
+
currentUserId?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
replyPlaceholder?: string;
|
|
20
|
+
replySubmitLabel?: string;
|
|
21
|
+
replyCancelLabel?: string;
|
|
22
|
+
onEdit?(comment: CommentNode): void;
|
|
23
|
+
onDelete?(comment: CommentNode): void;
|
|
24
|
+
onReport?(comment: CommentNode): void;
|
|
25
|
+
onReplySubmit?(comment: CommentNode, content: string): void;
|
|
26
|
+
}
|
|
27
|
+
export declare function CommentThread({ comments, currentUserId, className, replyPlaceholder, replySubmitLabel, replyCancelLabel, onReplySubmit, onEdit, onDelete, onReport, }: CommentThreadProps): React.ReactElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { CommentThread } from './CommentThread';
|
|
3
|
+
declare const meta: Meta<typeof CommentThread>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof CommentThread>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Empty: Story;
|
|
8
|
+
export declare const LongContent: Story;
|
|
9
|
+
export declare const ManyReplies: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CommentThread';
|