diff --git a/package-lock.json b/package-lock.json index c490e08..3bd427f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "@types/node": "^18.6.5", "@types/react": "^18.0.17", "@types/react-dom": "^18.0.6", + "classnames": "^2.3.1", "fast-memoize": "^2.5.2", "localforage": "^1.10.0", "react": "^18.2.0", @@ -7753,6 +7754,11 @@ "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" }, + "node_modules/classnames": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", + "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" + }, "node_modules/clean-css": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.1.tgz", @@ -29134,6 +29140,11 @@ "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==" }, + "classnames": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", + "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==" + }, "clean-css": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.1.tgz", diff --git a/package.json b/package.json index 36f45ee..aaff211 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@types/node": "^18.6.5", "@types/react": "^18.0.17", "@types/react-dom": "^18.0.6", + "classnames": "^2.3.1", "fast-memoize": "^2.5.2", "localforage": "^1.10.0", "react": "^18.2.0", diff --git a/src/components/ChatTranscript/ChatTranscript.tsx b/src/components/ChatTranscript/ChatTranscript.tsx index b6f481a..5889a3a 100644 --- a/src/components/ChatTranscript/ChatTranscript.tsx +++ b/src/components/ChatTranscript/ChatTranscript.tsx @@ -1,14 +1,21 @@ +import { HTMLAttributes } from 'react' +import cx from 'classnames' + import { Message as IMessage } from 'models/chat' import { Message } from 'components/Message' -export interface ChatTranscriptProps { +export interface ChatTranscriptProps extends HTMLAttributes { messageLog: Array userId: string } -export const ChatTranscript = ({ messageLog, userId }: ChatTranscriptProps) => { +export const ChatTranscript = ({ + className, + messageLog, + userId, +}: ChatTranscriptProps) => { return ( -
+
{messageLog.map(message => { return })} diff --git a/src/components/Room/Room.tsx b/src/components/Room/Room.tsx index ba69991..fb1271e 100644 --- a/src/components/Room/Room.tsx +++ b/src/components/Room/Room.tsx @@ -75,9 +75,13 @@ export function Room({ }) return ( -
+
Room ID: {roomId} - Open this page in another tab. +
-
) }