@@ -20,6 +20,9 @@ export const Align = {
20
20
21
21
export type Align = ( typeof Align ) [ keyof typeof Align ] ;
22
22
23
+ /**
24
+ * @deprecated
25
+ */
23
26
export interface ComponentOverrides {
24
27
MessageContainer ?: ( props : MessageContainerProps ) => JSX . Element ;
25
28
MessageContent ?: ( props : MessageContentProps ) => JSX . Element ;
@@ -35,28 +38,31 @@ export interface MessageProps
35
38
children ?: React . ReactNode ;
36
39
/**
37
40
* Determines whether the message is aligned to the left or right
38
- *
39
41
* By default, if `isSender === true`, the message is aligned to the right, and otherwise to the left. This prop overrides that behavior.
40
42
* @remarks This prop is only considered when the parent `LeafyGreenChatProvider` has `variant="spacious"`.
43
+ * @deprecated The spacious variant will be removed by EOY 2025. Instead, use the compact variant.
41
44
*/
42
45
align ?: Align ;
43
46
44
47
/**
45
48
* Avatar element
46
49
* @remarks This prop is only considered when the parent `LeafyGreenChatProvider` has `variant="spacious"`.
50
+ * @deprecated The spacious variant will be removed by EOY 2025. Instead, use the compact variant.
47
51
*/
48
52
avatar ?: ReactElement ;
49
53
50
54
/**
51
55
* Base font size
52
56
* @remarks This prop is only considered when the parent `LeafyGreenChatProvider` has `variant="spacious"`.
57
+ * @deprecated The spacious variant will be removed by EOY 2025. Instead, use the compact variant.
53
58
*/
54
59
baseFontSize ?: BaseFontSize ;
55
60
56
61
/**
57
62
* Component overrides for any subcomponents
58
63
* @deprecated
59
64
* @remarks This prop is only considered when the parent `LeafyGreenChatProvider` has `variant="spacious"`.
65
+ * @deprecated The spacious variant will be removed by EOY 2025. Instead, use the compact variant.
60
66
*/
61
67
componentOverrides ?: ComponentOverrides ;
62
68
@@ -69,12 +75,14 @@ export interface MessageProps
69
75
/**
70
76
* A list of links to render as rich links for the message.
71
77
* @remarks This prop is only considered when the parent `LeafyGreenChatProvider` has `variant="spacious"`.
78
+ * @deprecated The spacious variant will be removed by EOY 2025. Instead, use the compact variant.
72
79
*/
73
80
links ?: Array < RichLinkProps > ;
74
81
75
82
/**
76
83
* The heading text to display for the links section.
77
84
* @remarks This prop is only considered when the parent `LeafyGreenChatProvider` has `variant="spacious"`.
85
+ * @deprecated The spacious variant will be removed by EOY 2025. Instead, use the compact variant.
78
86
*/
79
87
linksHeading ?: string ;
80
88
@@ -86,26 +94,44 @@ export interface MessageProps
86
94
/**
87
95
* A callback function that is called when any link is clicked.
88
96
* @remarks This prop is only considered when the parent `LeafyGreenChatProvider` has `variant="spacious"`.
97
+ * @deprecated The spacious variant will be removed by EOY 2025. Instead, use the compact variant.
89
98
*/
90
99
onLinkClick ?: RichLinkProps [ 'onLinkClick' ] ;
91
100
92
101
/**
93
102
* Configure a *verified message* which includes additional styles and
94
103
* displays information about the message.
95
104
* @remarks This prop is only considered when the parent `LeafyGreenChatProvider` has `variant="spacious"`.
105
+ * @deprecated The spacious variant will be removed by EOY 2025. Instead, use the compact variant.
96
106
*/
97
107
verified ?: BaseMessageVerifiedBannerProps ;
98
108
}
99
109
110
+ /**
111
+ * Static property names used to identify Message compound components.
112
+ * These are implementation details for the compound component pattern and should not be exported.
113
+ */
114
+ export const MessageSubcomponentProperty = {
115
+ Actions : 'isLGMessageActions' ,
116
+ VerifiedBanner : 'isLGMessageVerifiedBanner' ,
117
+ Links : 'isLGMessageLinks' ,
118
+ } as const ;
119
+
120
+ /**
121
+ * Type representing the possible static property names for Message subcomponents.
122
+ */
123
+ export type MessageSubcomponentProperty =
124
+ ( typeof MessageSubcomponentProperty ) [ keyof typeof MessageSubcomponentProperty ] ;
125
+
100
126
export type ActionsType = ForwardRefExoticComponent < MessageActionsProps > & {
101
- isLGMessageActions ?: boolean ;
127
+ [ MessageSubcomponentProperty . Actions ] ?: boolean ;
102
128
} ;
103
129
104
130
export type LinksType = ForwardRefExoticComponent < MessageLinksProps > & {
105
- isLGMessageLinks ?: boolean ;
131
+ [ MessageSubcomponentProperty . Links ] ?: boolean ;
106
132
} ;
107
133
108
134
export type VerifiedBannerType =
109
135
ForwardRefExoticComponent < MessageVerifiedBannerProps > & {
110
- isLGMessageVerifiedBanner ?: boolean ;
136
+ [ MessageSubcomponentProperty . VerifiedBanner ] ?: boolean ;
111
137
} ;
0 commit comments