// @flow
import React from 'react';
import type { Node } from 'react';
import { View } from 'react-native';
import { Typography } from '../../src/';
import { space } from '../../src/Utils/Theme';

type Props = {
  children: Node,
  title: string,
};

const Section = ({ children, title }: Props) => (
  <View style={{ marginBottom: space.large }}>
    <Typography type="title" text={title} />
    <View>{children}</View>
  </View>
);

export default Section;
