@@ -47,11 +47,12 @@ const dataArray = [
4747 avatarUrl: " example.svg"
4848 },
4949 {
50- name: " Jack"
51- renderComponent : () => < div className= " sample-class" > Sample Component < div>
50+ name: " Jack" ,
51+ renderComponent : () => (
52+ < div className= " sample-class" > Sample Component < / div>
53+ )
5254 }
5355];
54-
5556```
5657
5758If no avatarUrl is specified for the user, following default Image will be considered.
@@ -88,7 +89,7 @@ This release includes breaking changes, new features, and updates. Please read t
8889 styles= {{
8990 Avatar : () => ({ ... styles }),
9091 Name : () => ({ ... styles }),
91- ExtraValue : () => ({ ... styles }),
92+ ExtraValue : () => ({ ... styles })
9293 }}
9394/ >
9495```
@@ -103,7 +104,7 @@ This release includes breaking changes, new features, and updates. Please read t
103104 styles= {{
104105 Avatar : () => ({ ... styles }),
105106 Name : () => ({ ... styles }),
106- ExtraCount : () => ({ ... styles }),
107+ ExtraCount : () => ({ ... styles })
107108 }}
108109/ >
109110```
@@ -140,7 +141,7 @@ Props that can be passed to the component are listed below:
140141 <td>
141142 To specify the size of the image element
142143 </td>
143- <td><code>40px </code></td>
144+ <td><code>40 </code></td>
144145 </tr>
145146 <tr>
146147 <td><code><b>variant?:</b> 'circular' | 'square' | 'rounded'</code></td>
@@ -159,19 +160,26 @@ Props that can be passed to the component are listed below:
159160 <tr>
160161 <td><code><b>showNameOnHover?:</b> boolean</code></td>
161162 <td>
162- To show the name of each user on hovering over the user image
163+ To show the name of each user on hovering over the user image. If there is a specified render component in the data array, it will be displayed instead of the name when you hover over the user's image
163164 </td>
164165 <td><code>false</code></td>
166+ </tr>
167+ <tr>
168+ <td><code><b>defaultAvatarImage?:</b> string</code></td>
169+ <td>
170+ To show a default avatar, if no avatarUrl is specified for a user. if there is no specified avatarUrl and defaultAvatarImage, default image will be considered.
171+ </td>
172+ <td><code><img src="./src/assets/default-avatar.svg" alt="" width="40" height="40"/></code></td>
165173 </tr>
166174 <tr>
167- <td><code><b>onUserClick?:</b> function </code></td>
175+ <td><code><b>onUserClick?:</b>(user: object) => void </code></td>
168176 <td>
169177 A callback function to be triggered on image click
170178 </td>
171179 <td><code>undefined</code></td>
172180 </tr>
173181 <tr>
174- <td><code><b>onCountClick?:</b> function </code></td>
182+ <td><code><b>onCountClick?:</b>() => void </code></td>
175183 <td>
176184 A callback function to be triggered on additional count(last bubble) click
177185 </td>
@@ -214,3 +222,28 @@ The below code shows all the overridable styles:
214222- ` Avatar ` - Overrides the avatar (user image) style
215223- ` Name ` - Overrides the user name style
216224- ` ExtraCount ` - Overrides the style of additional count displayed at last bubble
225+
226+ Example with the usage of other props
227+
228+ ``` jsx
229+ < InlineImages
230+ data= {dataArray}
231+ styles= {
232+ Avatar : () => ({
233+ border: " 1px solid white"
234+ }),
235+ Name : () => ({
236+ color: " white" ,
237+ fontSize: " 16px" ,
238+ backgroundColor: " grey" ,
239+ padding: " 5px" ,
240+ borderRadius: " 10px"
241+ }),
242+ ExtraCount : () => ({
243+ backgroundColor: " yellow" ,
244+ border: " 1px solid white"
245+ })
246+ }
247+ / >
248+
249+ ```
0 commit comments