Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/components/Launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Launcher extends Component {
super();
this.state = {
launcherIcon,
isOpen: false
isOpen: false,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's be consistent with our commas across the repo. If there is not consistency already, this change is unwarranted

};
}

Expand Down Expand Up @@ -47,7 +47,7 @@ class Launcher extends Component {
];
return (
<div id="sc-launcher">
<div className={classList.join(' ')} onClick={this.handleClick.bind(this)}>
<div className={classList.join(' ')} onClick={this.handleClick.bind(this)} style={{background: `${this.props.launcherColor}`}}>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be preferable to do this via the classList - inline styles can create confusion down the line.

<MessageCount count={this.props.newMessagesCount} isOpen={isOpen} />
<img className={'sc-open-icon'} src={launcherIconActive} />
<img className={'sc-closed-icon'} src={launcherIcon} />
Expand Down Expand Up @@ -84,11 +84,13 @@ Launcher.propTypes = {
messageList: PropTypes.arrayOf(PropTypes.object),
mute: PropTypes.bool,
showEmoji: PropTypes.bool,
launcherColor: PropTypes.string
};

Launcher.defaultProps = {
newMessagesCount: 0,
showEmoji: true
showEmoji: true,
launcherColor: "blue"
};

export default Launcher;