Flow for all the files

This commit is contained in:
Jori Lallo
2017-05-11 17:23:56 -07:00
parent a98199599a
commit 0a76d6af9e
110 changed files with 512 additions and 269 deletions

View File

@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
// @flow
import React from 'react';
import { observer } from 'mobx-react';
import { Flex } from 'reflexbox';
@@ -11,22 +12,25 @@ const cx = classNames.bind(styles);
import SidebarStore from './SidebarStore';
@observer class Sidebar extends React.Component {
static propTypes = {
open: PropTypes.bool,
onToggle: PropTypes.func.isRequired,
navigationTree: PropTypes.object.isRequired,
onNavigationUpdate: PropTypes.func.isRequired,
onNodeCollapse: PropTypes.func.isRequired,
};
type Props = {
open?: boolean,
onToggle: Function,
navigationTree: Object,
onNavigationUpdate: Function,
onNodeCollapse: Function,
};
constructor(props) {
@observer class Sidebar extends React.Component {
props: Props;
store: SidebarStore;
constructor(props: Props) {
super(props);
this.store = new SidebarStore();
}
toggleEdit = e => {
toggleEdit = (e: MouseEvent) => {
e.preventDefault();
this.store.toggleEdit();
};

View File

@@ -1,3 +1,4 @@
// @flow
import { observable, action } from 'mobx';
class SidebarStore {

View File

@@ -1,3 +1,4 @@
// @flow
import React from 'react';
import styles from './Separator.scss';

View File

@@ -1,2 +1,3 @@
// @flow
import Separator from './Separator';
export default Separator;

View File

@@ -1,2 +1,3 @@
// @flow
import Sidebar from './Sidebar';
export default Sidebar;