Skip to content

Commit 2bebf8e

Browse files
feat(react-sdk): custom text inside AIStateIndicator
1 parent 65bb739 commit 2bebf8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-sdk/src/components/ai-state-indicator.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const MESSAGES = [
1717
'Cooking up something good',
1818
];
1919

20-
export const AIStateIndicator = () => {
20+
export const AIStateIndicator = ({ text }: { text?: string }) => {
2121
const messageIndex = useMemo(
2222
() => Math.floor(Math.random() * MESSAGES.length),
2323
[],
@@ -32,7 +32,7 @@ export const AIStateIndicator = () => {
3232
<span className="aicr__state-indicator__dot" />
3333
</div>
3434
<span className="aicr__state-indicator__text">
35-
{MESSAGES[messageIndex]}
35+
{typeof text === 'string' ? text : MESSAGES[messageIndex]}
3636
</span>
3737
</div>
3838
</div>

0 commit comments

Comments
 (0)