Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- export default React.createClass({
- getDefaultProps() {
- return { active: 'fraims' }
- },
- className(group) {
- let className = "main-sidebar__navbar__item";
- className += ` main-sidebar__navbar__item--${group}`;
- if(this.props.active == group) {
- className += " main-sidebar__navbar__item--active";
- }
- return className;
- },
- render() {
- return (
- <div className="main-sidebar__navbar">
- <a className={this.className('fraims')}><span>Fraims</span></a>
- <a className={this.className('channel')}><span>Channel</span></a>
- <a className={this.className('account')}><span>Account</span></a>
- </div>
- )
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement