Skip to content

Commit

Permalink
change to hive chat colour flow on effect on text boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtabBukhari committed Feb 7, 2025
1 parent c8a0eec commit b440457
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/people/hiveChat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,8 @@ export const HiveChatView: React.FC = observer(() => {
<MessageBubble key={msg.id} isUser={msg.role === 'user'}>
{renderMarkdown(msg.message, {
codeBlockBackground: '#282c34',
textColor: msg.role === 'user' ? 'white' : '',
textColor: '#abb2bf',
bubbleTextColor: msg.role === 'user' ? 'white' : '',
borderColor: '#444',
codeBlockFont: 'Courier New'
})}
Expand Down
4 changes: 3 additions & 1 deletion src/people/utils/RenderMarkdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const MarkdownContainer = styled.div<{ textColor?: string }>`
interface CustomStyles {
codeBlockBackground?: string;
codeBlockFont?: string;
bubbleTextColor?: string;
textColor?: string;
borderColor?: string;
}
Expand All @@ -94,12 +95,13 @@ export function renderMarkdown(markdown: any, customStyles?: CustomStyles) {
const {
codeBlockBackground = '#050038',
codeBlockFont = 'monospace',
bubbleTextColor = '',
textColor = '#ffffff',
borderColor = '#444'
} = customStyles || {};

return (
<MarkdownContainer textColor={textColor}>
<MarkdownContainer textColor={bubbleTextColor}>
<ReactMarkdown
children={markdown}
remarkPlugins={[remarkGfm]}
Expand Down

0 comments on commit b440457

Please sign in to comment.