refactor: flow typing (#1012)
* fix: padding * fix: Minor button alignment issues * feat: Add icon to invite people button * WIP
This commit is contained in:
@@ -18,7 +18,7 @@ type Props = {
|
||||
ui: UiStore,
|
||||
documents: DocumentsStore,
|
||||
activeDocument: ?Document,
|
||||
prefetchDocument: (id: string) => *,
|
||||
prefetchDocument: (id: string) => Promise<void>,
|
||||
};
|
||||
|
||||
@observer
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { observer, inject } from 'mobx-react';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
import { withRouter, type RouterHistory } from 'react-router-dom';
|
||||
import keydown from 'react-keydown';
|
||||
import Flex from 'shared/components/Flex';
|
||||
import { PlusIcon } from 'outline-icons';
|
||||
@@ -17,7 +17,7 @@ import UiStore from 'stores/UiStore';
|
||||
import DocumentsStore from 'stores/DocumentsStore';
|
||||
|
||||
type Props = {
|
||||
history: Object,
|
||||
history: RouterHistory,
|
||||
collections: CollectionsStore,
|
||||
documents: DocumentsStore,
|
||||
onCreateCollection: () => void,
|
||||
|
||||
@@ -18,7 +18,7 @@ type Props = {
|
||||
documents: DocumentsStore,
|
||||
collection?: Collection,
|
||||
activeDocument: ?Document,
|
||||
activeDocumentRef?: (?HTMLElement) => *,
|
||||
activeDocumentRef?: (?HTMLElement) => void,
|
||||
prefetchDocument: (documentId: string) => Promise<void>,
|
||||
depth: number,
|
||||
};
|
||||
@@ -27,7 +27,7 @@ type Props = {
|
||||
class DocumentLink extends React.Component<Props> {
|
||||
@observable menuOpen = false;
|
||||
|
||||
handleMouseEnter = (ev: SyntheticEvent<*>) => {
|
||||
handleMouseEnter = (ev: SyntheticEvent<>) => {
|
||||
const { node, prefetchDocument } = this.props;
|
||||
|
||||
ev.stopPropagation();
|
||||
|
||||
@@ -9,7 +9,7 @@ import Flex from 'shared/components/Flex';
|
||||
|
||||
type Props = {
|
||||
to?: string | Object,
|
||||
onClick?: (SyntheticEvent<*>) => *,
|
||||
onClick?: (SyntheticEvent<>) => void,
|
||||
children?: React.Node,
|
||||
icon?: React.Node,
|
||||
expanded?: boolean,
|
||||
@@ -43,7 +43,7 @@ class SidebarLink extends React.Component<Props> {
|
||||
}
|
||||
|
||||
@action
|
||||
handleClick = (ev: SyntheticEvent<*>) => {
|
||||
handleClick = (ev: SyntheticEvent<>) => {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
this.expanded = !this.expanded;
|
||||
|
||||
Reference in New Issue
Block a user