({ title, location }, key)
| 24 | } |
| 25 | |
| 26 | renderLink({ title, location }, key) { |
| 27 | const arrow = <span className="arrowBullet" />; |
| 28 | |
| 29 | let linkClass = 'SideBar-item'; |
| 30 | if (this.props.example.location === location) { |
| 31 | linkClass += ' SideBar-item--selected'; |
| 32 | } |
| 33 | |
| 34 | return ( |
| 35 | <a key={key} href={location} target="_self" className={linkClass}> |
| 36 | <span className="SideBar-itemText">{title}</span> |
| 37 | {arrow} |
| 38 | </a> |
| 39 | ); |
| 40 | } |
| 41 | } |