Skip to content

Commit c91d357

Browse files
authored
Merge pull request idoco#22 from idoco/styling-fixes
New styling fixes
2 parents 4bcab79 + acabfb3 commit c91d357

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

demo.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ <h1>Intergram Demo Page</h1>
3737
<script>
3838
window.intergramId = 312940879;
3939
window.intergramServer = window.location.origin;
40+
window.intergramCustomizations = {
41+
closedChatAvatarUrl: 'media/demo_avatar.jpg',
42+
closedStyle: 'button', // button or chat
43+
};
4044
</script>
4145
<script src="/js/widget.js"></script>
4246

media/avatar.jpg

85.3 KB
Loading

src/widget/chat-title-msg.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default class ChatTitleMsg extends Component {
88
<div
99
className="desktop-closed-message"
1010
style={{
11-
background: '#1f8ceb',
11+
background: conf.mainColor,
1212
letterSpacing: '1px',
1313
color: '#fff',
1414
display: 'block',
@@ -32,9 +32,9 @@ export default class ChatTitleMsg extends Component {
3232
right: '-10px',
3333
borderTop: '10px solid transparent',
3434
borderBottom: '10px solid transparent',
35-
borderLeft: '10px solid #1f8ceb'
35+
borderLeft: '10px solid '+conf.mainColor
3636
}}
37-
></div>
37+
/>
3838
</div>
3939
<div
4040
className="desktop-closed-message-avatar"
@@ -48,7 +48,7 @@ export default class ChatTitleMsg extends Component {
4848
width: '60px',
4949
borderRadius: '999px',
5050
boxShadow: '#8e8d8d -3px 2px 20px',
51-
border: '2px solid #1f8ceb'
51+
border: '2px solid '+conf.mainColor
5252
}}
5353
>
5454
{(conf.closedChatAvatarUrl === '') ?

src/widget/default-configuration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const defaultConfiguration = {
55
closedStyle: 'chat', // button or chat
66
closedChatAvatarUrl: '', // only used if closedStyle is set to 'chat'
77
cookieExpiration: 1, // in days. Once opened, closed chat title will be shown as button (when closedStyle is set to 'chat')
8-
introMessage: 'Hello! How can we help you?',
8+
introMessage: 'Hello! How can I help you?',
99
autoResponse: 'Looking for the first available admin (It might take a minute)',
1010
autoNoResponse: 'It seems that no one is available to answer right now. Please tell us how we can ' +
1111
'contact you, and we will get back to you as soon as we can.',

src/widget/style.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export const desktopTitleStyle = {
5656
fontFamily: 'Lato, sans-serif',
5757
color: '#fff',
5858
cursor: 'pointer',
59-
borderBottom: '1px solid #0078e0'
6059
};
6160

6261
export const mobileTitleStyle = {

src/widget/widget.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default class Widget extends Component {
3030
if (!isChatOpen && (isMobile || conf.alwaysUseFloatingButton)) {
3131
wrapperStyle = { ...mobileClosedWrapperStyle}; // closed mobile floating button
3232
} else if (!isMobile){
33-
wrapperStyle = (conf.closedStyle === 'button' || isChatOpen || this.wasChatOpened()) ?
33+
wrapperStyle = (conf.closedStyle === 'chat' || isChatOpen || this.wasChatOpened()) ?
3434
(isChatOpen) ?
3535
{ ...desktopWrapperStyle, ...wrapperWidth} // desktop mode, button style
3636
:
@@ -51,7 +51,7 @@ export default class Widget extends Component {
5151

5252
:
5353

54-
(conf.closedStyle === 'button' || isChatOpen || this.wasChatOpened()) ?
54+
(conf.closedStyle === 'chat' || isChatOpen || this.wasChatOpened()) ?
5555
<div style={{background: conf.mainColor, ...desktopTitleStyle}} onClick={this.onClick}>
5656
<div style={{padding: '4px 30px 0px 0px'}}>
5757
{isChatOpen ? conf.titleOpen : conf.titleClosed}

0 commit comments

Comments
 (0)