@linktr.ee/messaging-react 1.8.8 → 1.9.0
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/index.d.ts +1 -0
- package/dist/index.js +194 -191
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Avatar/index.tsx +11 -3
- package/src/components/ChannelView.tsx +1 -1
- package/src/components/FaqList/index.tsx +2 -1
package/package.json
CHANGED
|
@@ -9,6 +9,7 @@ export interface AvatarProps {
|
|
|
9
9
|
image?: string
|
|
10
10
|
size?: number
|
|
11
11
|
className?: string
|
|
12
|
+
shape?: 'squircle' | 'circle'
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -19,6 +20,7 @@ export const Avatar: React.FC<AvatarProps> = ({
|
|
|
19
20
|
image,
|
|
20
21
|
size = 40,
|
|
21
22
|
className,
|
|
23
|
+
shape = 'squircle',
|
|
22
24
|
}) => {
|
|
23
25
|
const emoji = getAvatarEmoji(id)
|
|
24
26
|
|
|
@@ -31,15 +33,21 @@ export const Avatar: React.FC<AvatarProps> = ({
|
|
|
31
33
|
|
|
32
34
|
const fontSizeClass = getFontSizeClass()
|
|
33
35
|
|
|
36
|
+
const borderStyle =
|
|
37
|
+
shape === 'circle'
|
|
38
|
+
? { borderRadius: '50%' }
|
|
39
|
+
: {
|
|
40
|
+
borderRadius: '33%',
|
|
41
|
+
'corner-shape': 'superellipse(1.3)',
|
|
42
|
+
}
|
|
43
|
+
|
|
34
44
|
return (
|
|
35
45
|
<div
|
|
36
46
|
className={classNames('flex-shrink-0 overflow-hidden', className)}
|
|
37
47
|
style={{
|
|
38
48
|
width: `${size}px`,
|
|
39
49
|
height: `${size}px`,
|
|
40
|
-
|
|
41
|
-
// @ts-expect-error - corner-shape is not recognized by react types
|
|
42
|
-
'corner-shape': 'superellipse(1.3)',
|
|
50
|
+
...borderStyle,
|
|
43
51
|
}}
|
|
44
52
|
>
|
|
45
53
|
{image ? (
|
|
@@ -315,7 +315,7 @@ const ChannelInfoDialog: React.FC<{
|
|
|
315
315
|
name={participantName}
|
|
316
316
|
image={participantImage}
|
|
317
317
|
size={88}
|
|
318
|
-
|
|
318
|
+
shape="circle"
|
|
319
319
|
/>
|
|
320
320
|
<div className="flex flex-col min-w-0 flex-1">
|
|
321
321
|
<p className="truncate text-base font-semibold text-charcoal">
|
|
@@ -51,13 +51,14 @@ export const FaqList: React.FC<FaqListProps> = ({
|
|
|
51
51
|
name={avatarName || 'Account'}
|
|
52
52
|
image={avatarImage}
|
|
53
53
|
size={24}
|
|
54
|
+
shape="circle"
|
|
54
55
|
/>
|
|
55
56
|
</div>
|
|
56
57
|
)}
|
|
57
58
|
|
|
58
59
|
{/* FAQs with grey background */}
|
|
59
60
|
<div
|
|
60
|
-
className="flex-1 rounded-lg p-4
|
|
61
|
+
className="flex-1 flex flex-col gap-3 rounded-lg p-4"
|
|
61
62
|
style={{ backgroundColor: '#F1F0EE' }}
|
|
62
63
|
>
|
|
63
64
|
{headerText && (
|