@linktr.ee/messaging-react 3.4.2-rc-1782454787 → 3.4.2-rc-1782480798
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/dist/{Card-BQZcPeQn.js → Card-BKi2g6x-.js} +2 -2
- package/dist/{Card-BQZcPeQn.js.map → Card-BKi2g6x-.js.map} +1 -1
- package/dist/{Card-CSqZXHCM.cjs → Card-BMmrCMqJ.cjs} +2 -2
- package/dist/{Card-CSqZXHCM.cjs.map → Card-BMmrCMqJ.cjs.map} +1 -1
- package/dist/{Card-U9LAeCEA.js → Card-BYu6OBuX.js} +2 -2
- package/dist/{Card-U9LAeCEA.js.map → Card-BYu6OBuX.js.map} +1 -1
- package/dist/{Card-Cp0Ioui8.cjs → Card-DtIjtWy6.cjs} +2 -2
- package/dist/{Card-Cp0Ioui8.cjs.map → Card-DtIjtWy6.cjs.map} +1 -1
- package/dist/{Card-DFaRAFV1.js → Card-DvE5BCPf.js} +3 -3
- package/dist/{Card-DFaRAFV1.js.map → Card-DvE5BCPf.js.map} +1 -1
- package/dist/{Card-DWmbH7oz.cjs → Card-VO-i6CuV.cjs} +2 -2
- package/dist/{Card-DWmbH7oz.cjs.map → Card-VO-i6CuV.cjs.map} +1 -1
- package/dist/{LockedThumbnail-nLWi4Kxt.cjs → LockedThumbnail-Cl8uwCxM.cjs} +2 -2
- package/dist/{LockedThumbnail-nLWi4Kxt.cjs.map → LockedThumbnail-Cl8uwCxM.cjs.map} +1 -1
- package/dist/{LockedThumbnail-JOZFwdjw.js → LockedThumbnail-DTkd_kEt.js} +2 -2
- package/dist/{LockedThumbnail-JOZFwdjw.js.map → LockedThumbnail-DTkd_kEt.js.map} +1 -1
- package/dist/index-CSSe9eu7.cjs +2 -0
- package/dist/index-CSSe9eu7.cjs.map +1 -0
- package/dist/{index-DyG_ZuPp.js → index-IzhF38yj.js} +3440 -3205
- package/dist/index-IzhF38yj.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +25 -13
- package/dist/index.js +14 -13
- package/package.json +2 -2
- package/src/components/ChannelList/CustomChannelPreview.stories.tsx +0 -63
- package/src/components/ChannelList/CustomChannelPreview.test.tsx +8 -58
- package/src/components/ChannelList/CustomChannelPreview.tsx +12 -7
- package/src/components/ChannelView.stories.tsx +7 -38
- package/src/components/ChannelView.test.tsx +27 -44
- package/src/components/ChannelView.tsx +9 -19
- package/src/components/CustomMessage/StreamAttachmentMessage.test.tsx +109 -0
- package/src/components/CustomMessage/StreamAttachmentMessage.tsx +408 -0
- package/src/components/CustomMessage/index.tsx +42 -0
- package/src/components/CustomMessageInput/CustomMessageInput.test.tsx +34 -0
- package/src/components/CustomMessageInput/index.tsx +23 -1
- package/src/components/MessagingShell/index.tsx +2 -0
- package/src/hooks/useChannelStar.ts +6 -9
- package/src/index.ts +1 -0
- package/src/stream-custom-data.ts +1 -16
- package/src/types.ts +18 -0
- package/dist/index-BSQPos2Q.cjs +0 -2
- package/dist/index-BSQPos2Q.cjs.map +0 -1
- package/dist/index-DyG_ZuPp.js.map +0 -1
- package/src/components/ParticipantBadges.tsx +0 -42
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { CurrencyDollarIcon, StarIcon } from '@phosphor-icons/react'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import type { Channel, ChannelMemberResponse } from 'stream-chat'
|
|
4
|
-
|
|
5
|
-
import { useChannelStar } from '../hooks/useChannelStar'
|
|
6
|
-
|
|
7
|
-
export const ParticipantBadges: React.FC<{
|
|
8
|
-
channel?: Channel
|
|
9
|
-
participant?: ChannelMemberResponse
|
|
10
|
-
}> = ({ channel, participant }) => {
|
|
11
|
-
const isCustomer = participant?.customer === true
|
|
12
|
-
const isStarred = useChannelStar(channel)
|
|
13
|
-
|
|
14
|
-
if (!isCustomer && !isStarred) return null
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<span className="inline-flex shrink-0 items-center gap-1">
|
|
18
|
-
{isCustomer && (
|
|
19
|
-
<span
|
|
20
|
-
role="img"
|
|
21
|
-
aria-label="Customer"
|
|
22
|
-
className="inline-flex size-4 items-center justify-center rounded-full bg-[#22C55E] text-white"
|
|
23
|
-
>
|
|
24
|
-
<CurrencyDollarIcon
|
|
25
|
-
aria-hidden="true"
|
|
26
|
-
className="size-3"
|
|
27
|
-
weight="bold"
|
|
28
|
-
/>
|
|
29
|
-
</span>
|
|
30
|
-
)}
|
|
31
|
-
{isStarred && (
|
|
32
|
-
<span
|
|
33
|
-
role="img"
|
|
34
|
-
aria-label="Starred conversation"
|
|
35
|
-
className="inline-flex size-4 items-center justify-center rounded-full bg-[#F6C343] text-white"
|
|
36
|
-
>
|
|
37
|
-
<StarIcon aria-hidden="true" className="size-3" weight="fill" />
|
|
38
|
-
</span>
|
|
39
|
-
)}
|
|
40
|
-
</span>
|
|
41
|
-
)
|
|
42
|
-
}
|