Browse Source

Move types to separate declaration; related to #24

main
tricinel 8 years ago
parent
commit
9daf248d21
  1. 24
      src/components/MarkdownPage/MarkdownPage.js
  2. 11
      src/components/TitleAndMetaTags/TitleAndMetaTags.js
  3. 9
      src/templates/components/ChevronSvg/index.js

24
src/components/MarkdownPage/MarkdownPage.js

@ -19,6 +19,18 @@ import toCommaSeparatedList from 'utils/toCommaSeparatedList';
import {sharedStyles} from 'theme';
import createOgUrl from 'utils/createOgUrl';
type Props = {
authors: Array<string>,
createLink: Function,
date?: string,
enableScrollSync?: boolean,
ogDescription: string,
location: Object,
markdownRemark: Object,
sectionList: Array<Object>,
titlePostfix: string,
};
const MarkdownPage = ({
authors = [],
createLink,
@ -29,17 +41,7 @@ const MarkdownPage = ({
markdownRemark,
sectionList,
titlePostfix = '',
}: {
authors: Array<string>,
createLink: Function,
date: string,
enableScrollSync: boolean,
ogDescription: string,
location: Object,
markdownRemark: Object,
sectionList: Array<Object>,
titlePostfix: string,
}) => {
}: Props) => {
const hasAuthors = authors.length > 0;
const titlePrefix = markdownRemark.frontmatter.title || '';

11
src/components/TitleAndMetaTags/TitleAndMetaTags.js

@ -2,6 +2,7 @@
* Copyright (c) 2013-present, Facebook, Inc.
*
* @emails react-core
* @flow
*/
'use strict';
@ -11,15 +12,13 @@ import React from 'react';
const defaultDescription = 'A JavaScript library for building user interfaces';
const TitleAndMetaTags = ({
title,
ogDescription,
ogUrl,
}: {
type Props = {
title: string,
ogDescription: string,
ogUrl: string,
}) => {
};
const TitleAndMetaTags = ({title, ogDescription, ogUrl}: Props) => {
return (
<Helmet title={title}>
<meta property="og:title" content={title} />

9
src/templates/components/ChevronSvg/index.js

@ -9,13 +9,12 @@
import React from 'react';
const ChevronSvg = ({
size = 10,
cssProps = {},
}: {
type Props = {
size: number,
cssProps: Object,
}) => (
};
const ChevronSvg = ({size = 10, cssProps = {}}: Props) => (
<svg
css={cssProps}
viewBox="0 0 926.23699 573.74994"

Loading…
Cancel
Save