Flowtyping

This commit is contained in:
Tom Moor
2017-12-03 11:13:35 -08:00
parent 15e8e50601
commit 802f6e6594
23 changed files with 168 additions and 189 deletions

View File

@@ -1,9 +1,14 @@
// @flow
import React from 'react';
import InlineCode from './components/InlineCode';
import type { props } from 'slate-prop-types';
import { Mark } from 'slate';
export default function renderMark(props: props) {
type Props = {
children: React$Element<*>,
mark: Mark,
};
export default function renderMark(props: Props) {
switch (props.mark.type) {
case 'bold':
return <strong>{props.children}</strong>;