fix(sidebar): fix ordering and add hover state

This commit is contained in:
Evan Morikawa 2016-03-09 20:57:13 -05:00
parent ebd2973cf9
commit 3a28bb0529
5 changed files with 14 additions and 3 deletions

View file

@ -102,6 +102,10 @@ export default class GithubContactCardSection extends React.Component {
); );
} }
static containerStyles = {
order: 10,
}
render() { render() {
return ( return (
<div className="sidebar-github-profile"> <div className="sidebar-github-profile">

View file

@ -1,6 +1,8 @@
@import "ui-variables"; @import "ui-variables";
.sidebar-github-profile { .sidebar-github-profile {
margin-bottom: 20px;
a{ text-decoration: none; } a{ text-decoration: none; }
.logo { .logo {

View file

@ -80,14 +80,14 @@ export default class SidebarParticipantProfile extends React.Component {
<div className="core-personal-info"> <div className="core-personal-info">
<div className="selectable full-name" onClick={this._select}>{this.props.contact.fullName()}</div> <div className="selectable full-name" onClick={this._select}>{this.props.contact.fullName()}</div>
<div className="selectable email" onClick={this._select}>{this.props.contact.email}</div> <div className="selectable email" onClick={this._select}>{this.props.contact.email}</div>
<div className="social-profiles-wrap">{this._renderSocialProfiles()}</div> {this._renderSocialProfiles()}
</div> </div>
) )
} }
_renderSocialProfiles() { _renderSocialProfiles() {
if (!this.state.socialProfiles) { return false } if (!this.state.socialProfiles) { return false }
return _.map(this.state.socialProfiles, (profile, type) => { const profiles = _.map(this.state.socialProfiles, (profile, type) => {
const linkFn = () => {shell.openExternal(profile.url)} const linkFn = () => {shell.openExternal(profile.url)}
return ( return (
<a className="social-profile-item" onClick={linkFn} key={type}> <a className="social-profile-item" onClick={linkFn} key={type}>
@ -96,6 +96,7 @@ export default class SidebarParticipantProfile extends React.Component {
</a> </a>
) )
}); });
return <div className="social-profiles-wrap">{profiles}</div>
} }
_renderAdditionalInfo() { _renderAdditionalInfo() {

View file

@ -16,7 +16,7 @@ export default class RelatedThreads extends React.Component {
} }
static containerStyles = { static containerStyles = {
order: 1, order: 99,
} }
_onClick(thread) { _onClick(thread) {

View file

@ -20,6 +20,10 @@
padding: 0.5em 15px; padding: 0.5em 15px;
border-top: 1px solid rgba(0,0,0,0.08); border-top: 1px solid rgba(0,0,0,0.08);
&:hover {
background: darken(#f9fcfe, 5%);
}
.subject { .subject {
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;