Sha256: 6a70dbba9322c78a143bec4c5ca70e2e173559bc1e9723b6e3acdb5a72a2d08b
Contents?: true
Size: 1.28 KB
Versions: 4
Compression:
Stored size: 1.28 KB
Contents
import React from 'react'; import { get, bindAll } from 'lodash'; import Config from '../config'; import Extensions from '../extensions'; function Logo() { const url = get(Config, 'system_settings.logo.thumbnail_url'); const title = get(Extensions, 'controlling.title'); return url ? <img alt={`${title} Logo`} src={`//${Config.api_host}${url}`} /> : <span>{title}</span>; } export default class Navbar extends React.Component { static contextTypes = { uistate: React.PropTypes.object.isRequired, } constructor(props) { super(props); bindAll(this, 'switchMenu'); } switchMenu(ev) { if (ev) { ev.preventDefault(); } this.context.uistate.nextSidebarState(); } render() { return ( <div className="header-top"> <div className="navbar-header"> <div className="navbar-brand logo"><Logo /></div> <button className="screens-menu-toggle" onClick={this.switchMenu} type="button"> <span className="sr-only"> Toggle navbar </span> <i className="icon" /> </button> </div> </div> ); } }
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
lanes-0.8.3 | client/lanes/workspace/navbar.jsx |
lanes-0.8.2 | client/lanes/workspace/navbar.jsx |
lanes-0.8.1 | client/lanes/workspace/navbar.jsx |
lanes-0.8.0 | client/lanes/workspace/navbar.jsx |