File tree Expand file tree Collapse file tree
src/custom/CollaboratorAvatarGroup Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,17 +6,58 @@ import { iconSmall } from '../../constants/iconsSizes';
66import { styled , useTheme } from '../../theme' ;
77import { CustomTooltip } from '../CustomTooltip' ;
88
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+ */
939interface User {
1040 name : string ;
1141 avatar_url : string ;
1242 border_color : string ;
1343 user_id : string ;
1444}
1545
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+ */
1651interface Users {
1752 [ clientID : string ] : User ;
1853}
1954
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+ */
2061interface CollaboratorAvatarGroupProps {
2162 users : Users ;
2263 providerUrl : string ;
You can’t perform that action at this time.
0 commit comments