This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from 'react-pure-render/component'; | |
import React, {PropTypes} from 'react'; | |
import {Col} from 'react-bootstrap'; | |
import {Link} from 'react-router'; | |
export default class PageHeader extends Component { | |
static propTypes = { | |
description: PropTypes.string, | |
menu: PropTypes.object, | |
title: PropTypes.string.isRequired |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from 'react-pure-render/component'; | |
import React, {PropTypes} from 'react'; | |
export default class Page extends Component { | |
static propTypes = { | |
// ... | |
} | |
render() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from 'react-pure-render/component'; | |
import React, {PropTypes} from 'react'; | |
export default class Header extends Component { | |
static propTypes = { | |
actions: PropTypes.object.isRequired, | |
pathname: PropTypes.string.isRequired, | |
ui: PropTypes.object.isRequired | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as actions from './actions'; | |
import {Record} from 'immutable'; | |
const InitialState = Record({ | |
isSideMenuOpen: false | |
}); | |
const initialState = new InitialState; | |
export default function uiReducer(state = initialState, action) { | |
if (!(state instanceof InitialState)) return initialState; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const ON_SIDE_MENU_CHANGE = 'ON_SIDE_MENU_CHANGE'; | |
export const TOGGLE_SIDE_MENU = 'TOGGLE_SIDE_MENU'; | |
export function onSideMenuChange(isOpen) { | |
return { | |
type: ON_SIDE_MENU_CHANGE, | |
payload: {isOpen} | |
}; | |
} |