File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
src/custom/CollaboratorAvatarGroup Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -6,17 +6,58 @@ import { iconSmall } from '../../constants/iconsSizes';
6
6
import { styled , useTheme } from '../../theme' ;
7
7
import { CustomTooltip } from '../CustomTooltip' ;
8
8
9
+ /**
10
+ * CollaboratorAvatarGroup is a component that displays a group of user avatars with a popup for additional users.
11
+ *
12
+ * @component
13
+ * @example
14
+ * ```tsx
15
+ * const users = {
16
+ * 'client1': {
17
+ * name: 'John Doe',
18
+ * avatar_url: 'https://example.com/avatar1.jpg',
19
+ * border_color: '#00B39F',
20
+ * user_id: 'user123'
21
+ * }
22
+ * };
23
+ *
24
+ * <CollaboratorAvatarGroup
25
+ * users={users}
26
+ * providerUrl="https://redirect.com"
27
+ * />
28
+ * ```
29
+ */
30
+
31
+ /**
32
+ * User object structure representing a collaborator
33
+ * @interface User
34
+ * @property {string } name - Display name of the user
35
+ * @property {string } avatar_url - URL to the user's avatar image
36
+ * @property {string } border_color - Color code for the avatar border (e.g., '#00B39F')
37
+ * @property {string } user_id - Unique identifier for the user
38
+ */
9
39
interface User {
10
40
name : string ;
11
41
avatar_url : string ;
12
42
border_color : string ;
13
43
user_id : string ;
14
44
}
15
45
46
+ /**
47
+ * Collection of users mapped by their client IDs
48
+ * @interface Users
49
+ * @property {User } [clientID] - User object mapped to their client ID
50
+ */
16
51
interface Users {
17
52
[ clientID : string ] : User ;
18
53
}
19
54
55
+ /**
56
+ * Props for the CollaboratorAvatarGroup component
57
+ * @interface CollaboratorAvatarGroupProps
58
+ * @property {Users } users - Object containing user information mapped by client IDs
59
+ * @property {string } providerUrl - Base URL of the provider (e.g., 'https://github.com')
60
+ */
20
61
interface CollaboratorAvatarGroupProps {
21
62
users : Users ;
22
63
providerUrl : string ;
You can’t perform that action at this time.
0 commit comments