File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ var CodeViewer = require('../Components/CodeViewer')
55var SnippetList = React . createClass ( {
66 propTypes : {
77 snippets : React . PropTypes . array ,
8- selectSnippet : React . PropTypes . func
8+ selectSnippet : React . PropTypes . func ,
9+ currentSnippet : React . PropTypes . object
910 } ,
1011 itemClickHandlerFactory : function ( snippet ) {
1112 return function ( ) {
@@ -20,7 +21,7 @@ var SnippetList = React.createClass({
2021 )
2122 } )
2223 return (
23- < li key = { snippet . id } onClick = { this . itemClickHandlerFactory ( snippet ) } >
24+ < li className = { this . props . currentSnippet . id === snippet . id ? 'active' : '' } key = { snippet . id } onClick = { this . itemClickHandlerFactory ( snippet ) } >
2425 < div className = 'callSign' > < i className = 'fa fa-code' > </ i > { snippet . callSign } </ div >
2526 < div className = 'description' > { snippet . description } </ div >
2627 < div className = 'updatedAt' > { snippet . updatedAt } </ div >
Original file line number Diff line number Diff line change 11.SideNavigator
22 absolute top bottom left
33 width 200px
4- border-right solid 2 px brandColor
4+ border-right solid 1 px highlightenBorderColor
55 padding 10px
66 box-sizing border-box
77 .nav-header
Original file line number Diff line number Diff line change 3131 font-size 0.8em
3232 & :hover , & .hover
3333 background-color hoverBackgroundColor
34+ & :active , & .active
35+ border solid 2px brandBorderColor
36+ padding 9px 9px 8px
3437
3538 .SnippetViewer
3639 absolute top bottom right
You can’t perform that action at this time.
0 commit comments