@@ -35,8 +35,8 @@ export default class IgcChatMessageComponent extends LitElement {
3535 @property ( { reflect : true , attribute : false } )
3636 public user : IgcUser | undefined ;
3737
38- @property ( { type : Boolean , attribute : 'enable -reactions' } )
39- public enableReactions = true ;
38+ @property ( { type : Boolean , attribute : 'disable -reactions' } )
39+ public disableReactions = false ;
4040
4141 private formatTime ( date : Date | undefined ) : string | undefined {
4242 return date ?. toLocaleTimeString ( [ ] , { hour : '2-digit' , minute : '2-digit' } ) ;
@@ -89,6 +89,13 @@ export default class IgcChatMessageComponent extends LitElement {
8989 ${ this . message ?. text . trim ( )
9090 ? html ` < div class ="bubble "> ${ this . message ?. text } </ div > `
9191 : '' }
92+ ${ this . message ?. attachments && this . message ?. attachments . length > 0
93+ ? html `< igc-message-attachments
94+ .attachments =${ this . message ?. attachments }
95+ >
96+ </ igc-message-attachments > `
97+ : '' }
98+
9299 < div class ="meta ">
93100 < span class ="time "
94101 > ${ this . formatTime ( this . message ?. timestamp ) } </ span
@@ -101,21 +108,15 @@ export default class IgcChatMessageComponent extends LitElement {
101108 > `
102109 : '' }
103110 </ div >
104- ${ this . message ?. attachments && this . message ?. attachments . length > 0
105- ? html `< igc-message-attachments
106- .attachments =${ this . message ?. attachments }
107- >
108- </ igc-message-attachments > `
109- : '' }
110111 </ div >
111- ${ this . enableReactions
112- ? html `< igc-message-reactions
112+ ${ this . disableReactions
113+ ? ''
114+ : html `< igc-message-reactions
113115 .reactions =${ this . message ?. reactions }
114116 .messageId =${ this . message ?. id }
115117 .currentUserId=${ this . isCurrentUser ( ) ? sender ?. id : '' }
116118 @add-reaction=${ this . handleAddReaction }
117- > </ igc-message-reactions > `
118- : '' }
119+ > </ igc-message-reactions > ` }
119120 </ div >
120121 ` ;
121122 }
0 commit comments