Skip to content

Commit 83d7bc4

Browse files
fix(react-sdk): default component adjustments (#26)
1 parent abc89ec commit 83d7bc4

File tree

7 files changed

+27
-15
lines changed

7 files changed

+27
-15
lines changed

.changeset/slick-jeans-beg.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@stream-io/chat-react-ai': patch
3+
---
4+
5+
Adjust styling and certain prop types, add `material-symbols` as a peer dep

packages/react-sdk/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
"packageManager": "[email protected]",
5252
"peerDependencies": {
5353
"react": "^17 || ^18 || ^19",
54-
"react-dom": "^17 || ^18 || ^19"
54+
"react-dom": "^17 || ^18 || ^19",
55+
"material-symbols": "^0.40.0"
5556
},
5657
"devDependencies": {
5758
"@types/node": "^24",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use client';
2-
31
import { useMemo } from 'react';
42

53
const MESSAGES = [

packages/react-sdk/src/components/composer/ai-message-composer.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -398,18 +398,19 @@ const SpeechToTextButton = (
398398
);
399399
};
400400

401-
const SubmitButton = (
402-
props: ComponentPropsWithoutRef<'button'> & { active?: boolean },
403-
) => {
401+
const SubmitButton = ({
402+
active,
403+
...restProps
404+
}: ComponentPropsWithoutRef<'button'> & { active?: boolean }) => {
404405
const { disabled } = useIsDisabled();
405406
return (
406407
<button
407408
className={clsx(
408409
'aicr__ai-message-composer__round-button',
409-
props.active && 'aicr__ai-message-composer__round-button--active',
410+
active && 'aicr__ai-message-composer__round-button--active',
410411
)}
411412
type="submit"
412-
{...props}
413+
{...restProps}
413414
disabled={disabled}
414415
>
415416
<span className="material-symbols-rounded">send</span>

packages/react-sdk/src/styles/index.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
@use './ai-state-indicator.scss';
55

66
:root {
7-
--aicr__bg-primary: #121212;
8-
--aicr__bg-secondary: #1e1e1e;
9-
--aicr__bg-tertiary: #2c2c2c;
10-
--aicr__text-primary: #ffffff;
11-
--aicr__text-secondary: #aaaaaa;
12-
}
7+
--aicr__bg-primary: #ffffff;
8+
--aicr__bg-secondary: #f7f7f8;
9+
--aicr__bg-tertiary: #ececf1;
10+
--aicr__text-primary: #353740;
11+
--aicr__text-secondary: #565869;
12+
}

packages/react-sdk/src/styles/streaming-message.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@
6767
}
6868

6969
.aicr__syntax-highlighter-pre {
70-
// Syntax highlighting color variables (modern light theme for #ececf1 background)
70+
overflow-x: auto;
71+
background-color: var(--aicr__bg-primary);
72+
border-radius: 0.5rem;
73+
padding: .5rem;
74+
margin: 0;
7175

7276
code[class*='language-'] {
7377
// background: #272b33;

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)