Skip to content

Commit

Permalink
fix: Fix static svg imports
Browse files Browse the repository at this point in the history
  • Loading branch information
tjtanjin committed Feb 12, 2025
1 parent 76f72e7 commit 1c42f2d
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/components/Buttons/EmojiButton/EmojiButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const EmojiButton = () => {

// styles for emoji disabled button
const emojiButtonDisabledStyle: React.CSSProperties = {
cursor: `url(${settings.general?.actionDisabledIcon}), auto`,
cursor: `url("${settings.general?.actionDisabledIcon}"), auto`,
...styles.emojiButtonStyle, // by default inherit the base style
...styles.emojiButtonDisabledStyle
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const FileAttachmentButton = () => {

// styles for file attachment disabled button
const fileAttachmentButtonDisabledStyle = {
cursor: `url(${settings.general?.actionDisabledIcon}), auto`,
cursor: `url("${settings.general?.actionDisabledIcon}"), auto`,
...styles.fileAttachmentButtonStyle, // by default inherit the base style
...styles.fileAttachmentButtonDisabledStyle
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Buttons/SendButton/SendButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const SendButton = () => {

// styles for disabled send button
const sendButtonDisabledStyle: React.CSSProperties = {
cursor: `url(${settings.general?.actionDisabledIcon}), auto`,
cursor: `url("${settings.general?.actionDisabledIcon}"), auto`,
backgroundColor: settings.general?.primaryColor,
...styles.sendButtonStyle, // by default inherit the base style
...styles.sendButtonDisabledStyle
Expand Down
6 changes: 3 additions & 3 deletions src/components/ChatBotBody/ChatBotBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const ChatBotBody = ({
)}
{showAvatar && (
<div
style={{ backgroundImage: `url(${settings.userBubble?.avatar})` }}
style={{ backgroundImage: `url("${settings.userBubble?.avatar}")` }}
className="rcb-message-user-avatar"
/>
)}
Expand All @@ -178,7 +178,7 @@ const ChatBotBody = ({
<div className="rcb-bot-message-container">
{showAvatar && (
<div
style={{ backgroundImage: `url(${settings.botBubble?.avatar})` }}
style={{ backgroundImage: `url("${settings.botBubble?.avatar}")` }}
className="rcb-message-bot-avatar"
/>
)}
Expand Down Expand Up @@ -228,7 +228,7 @@ const ChatBotBody = ({
<div className="rcb-bot-message-container">
{settings.botBubble?.showAvatar &&
<div
style={{backgroundImage: `url(${settings.botBubble?.avatar})`}}
style={{backgroundImage: `url("${settings.botBubble?.avatar}")`}}
className="rcb-message-bot-avatar"
/>
}
Expand Down
8 changes: 4 additions & 4 deletions src/components/ChatBotBody/UserCheckboxes/UserCheckboxes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const UserCheckboxes = ({

// styles for bot checkbox row items
const botCheckboxRowStyle: React.CSSProperties = {
cursor: disabled ? `url(${settings.general?.actionDisabledIcon}), auto` : "pointer",
cursor: disabled ? `url("${settings.general?.actionDisabledIcon}"), auto` : "pointer",
color: settings.general?.primaryColor,
borderColor: settings.general?.primaryColor,
...styles.botCheckboxRowStyle
Expand All @@ -55,22 +55,22 @@ const UserCheckboxes = ({
// styles for bot checkbox next button
const botCheckboxNextStyle: React.CSSProperties = {
cursor: disabled || checkedBoxes.size < (checkboxes.min as number)
? `url(${settings.general?.actionDisabledIcon}), auto` : "pointer",
? `url("${settings.general?.actionDisabledIcon}"), auto` : "pointer",
color: settings.general?.primaryColor,
borderColor: settings.general?.primaryColor,
...styles.botCheckboxNextStyle
};

// styles for bot checkmark
const botCheckMarkStyle: React.CSSProperties = {
cursor: disabled ? `url(${settings.general?.actionDisabledIcon}), auto` : "pointer",
cursor: disabled ? `url("${settings.general?.actionDisabledIcon}"), auto` : "pointer",
color: "transparent",
...styles.botCheckMarkStyle
};

// styles for bot selected checkmark
const botCheckMarkSelectedStyle: React.CSSProperties = {
cursor: disabled ? `url(${settings.general?.actionDisabledIcon}), auto` : "pointer",
cursor: disabled ? `url("${settings.general?.actionDisabledIcon}"), auto` : "pointer",
color: "#fff",
borderColor: settings.general?.primaryColor,
backgroundColor: settings.general?.primaryColor,
Expand Down
2 changes: 1 addition & 1 deletion src/components/ChatBotBody/UserOptions/UserOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const UserOptions = ({

// styles for bot option
const botOptionStyle: React.CSSProperties = {
cursor: disabled ? `url(${settings.general?.actionDisabledIcon}), auto` : "pointer",
cursor: disabled ? `url("${settings.general?.actionDisabledIcon}"), auto` : "pointer",
color: settings.general?.primaryColor,
borderColor: settings.general?.primaryColor,
backgroundColor: "#fff",
Expand Down
2 changes: 1 addition & 1 deletion src/components/ChatBotHeader/ChatBotHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const ChatBotHeader = ({ buttons }: { buttons: JSX.Element[] }) => {
<div className="rcb-chat-header">
{settings.header?.showAvatar &&
<div
style={{backgroundImage: `url(${settings.header?.avatar})`}}
style={{backgroundImage: `url("${settings.header?.avatar}")`}}
className="rcb-bot-avatar"
/>
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ChatBotInput/ChatBotInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const ChatBotInput = ({ buttons }: { buttons: JSX.Element[] }) => {

// styles for disabled text area
const textAreaDisabledStyle: React.CSSProperties = {
cursor: `url(${settings.general?.actionDisabledIcon}), auto`,
cursor: `url("${settings.general?.actionDisabledIcon}"), auto`,
caretColor: "transparent",
boxSizing: isDesktop ? "content-box" : "border-box",
...styles.chatInputAreaStyle, // by default inherit the base style for input area
Expand Down
6 changes: 3 additions & 3 deletions src/services/ChatHistoryService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ const addStyleToOptions = (classList: DOMTokenList, attributes: {[key: string]:
...(attributes["style"] as CSSProperties),
color: styles.botOptionStyle?.color ?? settings.general?.primaryColor,
borderColor: styles.botOptionStyle?.color ?? settings.general?.primaryColor,
cursor: `url(${settings.general?.actionDisabledIcon}), auto`,
cursor: `url("${settings.general?.actionDisabledIcon}"), auto`,
...styles.botOptionStyle
}
}
Expand All @@ -323,7 +323,7 @@ const addStyleToCheckboxRows = (classList: DOMTokenList, attributes: {[key: stri
...(attributes["style"] as CSSProperties),
color: styles.botCheckboxRowStyle?.color ?? settings.general?.primaryColor,
borderColor: styles.botCheckboxRowStyle?.color ?? settings.general?.primaryColor,
cursor: `url(${settings.general?.actionDisabledIcon}), auto`,
cursor: `url("${settings.general?.actionDisabledIcon}"), auto`,
...styles.botCheckboxRowStyle
}
}
Expand All @@ -344,7 +344,7 @@ const addStyleToCheckboxNextButton = (classList: DOMTokenList, attributes: {[key
...(attributes["style"] as CSSProperties),
color: styles.botCheckboxNextStyle?.color ?? settings.general?.primaryColor,
borderColor: styles.botCheckboxNextStyle?.color ?? settings.general?.primaryColor,
cursor: `url(${settings.general?.actionDisabledIcon}), auto`,
cursor: `url("${settings.general?.actionDisabledIcon}"), auto`,
...styles.botCheckboxNextStyle
}
}
Expand Down

0 comments on commit 1c42f2d

Please sign in to comment.