@linktr.ee/messaging-react 1.20.0 → 1.21.0-rc-1771294922

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktr.ee/messaging-react",
3
- "version": "1.20.0",
3
+ "version": "1.21.0-rc-1771294922",
4
4
  "description": "React messaging components built on messaging-core for web applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -528,6 +528,7 @@ const ChannelViewInner: React.FC<{
528
528
  onReportParticipantClick?: () => void
529
529
  showStarButton?: boolean
530
530
  chatbotVotingEnabled?: boolean
531
+ renderChannelBanner?: () => React.ReactNode
531
532
  }> = ({
532
533
  onBack,
533
534
  showBackButton,
@@ -540,6 +541,7 @@ const ChannelViewInner: React.FC<{
540
541
  onReportParticipantClick,
541
542
  showStarButton = false,
542
543
  chatbotVotingEnabled = false,
544
+ renderChannelBanner,
543
545
  }) => {
544
546
  const { channel } = useChannelStateContext()
545
547
  const infoDialogRef = useRef<HTMLDialogElement>(null)
@@ -602,6 +604,9 @@ const ChannelViewInner: React.FC<{
602
604
  />
603
605
  </div>
604
606
 
607
+ {/* Custom Banner/Summary */}
608
+ {renderChannelBanner?.()}
609
+
605
610
  {/* Message List */}
606
611
  <div className="flex-1 overflow-hidden relative">
607
612
  <MessageList
@@ -658,6 +663,7 @@ export const ChannelView = React.memo<ChannelViewProps>(
658
663
  onMessageSent,
659
664
  showStarButton = false,
660
665
  chatbotVotingEnabled = false,
666
+ renderChannelBanner,
661
667
  }) => {
662
668
  // Custom send message handler that:
663
669
  // 1. Applies messageMetadata if provided
@@ -731,6 +737,7 @@ export const ChannelView = React.memo<ChannelViewProps>(
731
737
  onReportParticipantClick={onReportParticipantClick}
732
738
  showStarButton={showStarButton}
733
739
  chatbotVotingEnabled={chatbotVotingEnabled}
740
+ renderChannelBanner={renderChannelBanner}
734
741
  />
735
742
  </Channel>
736
743
  </div>
package/src/types.ts CHANGED
@@ -147,6 +147,13 @@ export interface ChannelViewProps {
147
147
  * Defaults to false.
148
148
  */
149
149
  chatbotVotingEnabled?: boolean
150
+
151
+ /**
152
+ * Custom render function for a banner/card component that renders
153
+ * between the channel header and message list.
154
+ * Useful for showing summaries, alerts, or contextual information.
155
+ */
156
+ renderChannelBanner?: () => React.ReactNode
150
157
  }
151
158
 
152
159
  /**
@@ -165,6 +172,7 @@ export type ChannelViewPassthroughProps = Pick<
165
172
  | 'onMessageSent'
166
173
  | 'showStarButton'
167
174
  | 'chatbotVotingEnabled'
175
+ | 'renderChannelBanner'
168
176
  >
169
177
 
170
178
  /**