on 2144ac9 help sign in
33 lines 758 B history raw
1import React from 'react';
2import cn from 'classnames';
3import { Flex } from 'indigo-react';
5import Footer from './Footer';
7// View is a top-level component that all Views must render to inherit styling
8function View({ className, children, full = false, ...rest }) {
9 return (
10 <Flex
11 col
12 justify="between"
13 className={cn(
14 'minh-100 ph5',
15 {
16 mw1: !full,
17 'mw2 ph9-md ph10-lg': full,
18 },
19 className
20 )}
21 {...rest}>
22 <Flex.Item className="pv5">{children}</Flex.Item>
23 <Footer.Target />
24 </Flex>
25 );
28// View.Full is sugar for <View full /> to help with readability
29View.Full = function FullView(props) {
30 return <View full {...props} />;
31};
33export default View;