Skip to content

Commit

Permalink
chore: add inline style for typing indicator (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
damirgros authored Aug 29, 2024
1 parent d0cae97 commit cd1c8a5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/ChatBotBody/ChatBotBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const ChatBotBody = ({
const bodyStyle: CSSProperties = {
...styles?.bodyStyle,
scrollbarWidth: settings.chatWindow?.showScrollbar ? "auto" : "none",
}
};

// styles for user bubble
const userBubbleStyle: CSSProperties = {
Expand Down Expand Up @@ -272,10 +272,10 @@ const ChatBotBody = ({
}}
className={`rcb-bot-message ${botBubbleEntryStyle}`}
>
<div className="rcb-typing-indicator">
<span className="rcb-dot"/>
<span className="rcb-dot"/>
<span className="rcb-dot"/>
<div className="rcb-typing-indicator" style={{...styles?.rcbTypingIndicatorStyle}}>
<span className="rcb-dot" style={{...styles?.rcbDotStyle}}/>
<span className="rcb-dot" style={{...styles?.rcbDotStyle}}/>
<span className="rcb-dot" style={{...styles?.rcbDotStyle}}/>
</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/constants/internal/DefaultStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ export const DefaultStyles: Styles = {
voiceIconStyle: {},
voiceIconDisabledStyle: {},
sendIconStyle: {},
rcbTypingIndicatorStyle: {},
rcbDotStyle: {},
}
2 changes: 2 additions & 0 deletions src/types/Styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ export type Styles = {
voiceIconStyle?: React.CSSProperties;
voiceIconDisabledStyle?: React.CSSProperties;
sendIconStyle?: React.CSSProperties;
rcbTypingIndicatorStyle?: React.CSSProperties;
rcbDotStyle?: React.CSSProperties;
}

0 comments on commit cd1c8a5

Please sign in to comment.