1 | import React from 'react'
|
2 | import styled from 'styled-components'
|
3 |
|
4 | import {
|
5 | H1,
|
6 | H2,
|
7 | P,
|
8 | FlexCol
|
9 | } from 'SRC'
|
10 |
|
11 | import defaultProps from './defaultProps'
|
12 |
|
13 | const BaseAboutUs = ({className, header, sections, footer, ...props}) => {
|
14 | return (<section className={className}>
|
15 | <FlexCol mobile={{width: 4}} desktop={{width: 6, span: 3}}>
|
16 | <H1>{header}</H1>
|
17 | </FlexCol>
|
18 | <FlexCol className='flexDiv' mobile={{width: 4}} desktop={{width: 10, span: 1}}>
|
19 | {
|
20 | sections.map((section, i) => {
|
21 | return (
|
22 | <FlexCol mobile={{width: 4}} desktop={{width: 4}} key={`about-us-${i}`}>
|
23 | <div>
|
24 | <H2>{section.title}</H2>
|
25 | <P>{section.body}</P>
|
26 | </div>
|
27 | </FlexCol>
|
28 | )
|
29 | })
|
30 | }
|
31 | </FlexCol>
|
32 | <FlexCol mobile={{width: 4}} desktop={{width: 12}}>
|
33 | <H2>{footer}</H2>
|
34 | </FlexCol>
|
35 | </section>)
|
36 | }
|
37 |
|
38 | const AboutUs = styled(BaseAboutUs)`
|
39 | ${H1}, ${H2} {
|
40 | text-align: center;
|
41 | text-transform: uppercase;
|
42 | @media (max-width: 958px) { font-size: 3.4rem; }
|
43 | }
|
44 | ${H1} {
|
45 | margin: 0 auto;
|
46 | margin-bottom: 20px;
|
47 | }
|
48 | ${H2} {
|
49 | color: ${props => props.theme.colors.rocketBlue};
|
50 | margin-top: 40px;
|
51 | margin-bottom: 10px;
|
52 | }
|
53 | ${P} {
|
54 | text-align: center;
|
55 | line-height: 1.5;
|
56 | max-width: 450px;
|
57 | margin: 0 auto;
|
58 | font-size: 18px;
|
59 | letter-spacing: 1px;
|
60 | }
|
61 | .flexDiv {
|
62 | display: flex;
|
63 | flex-direction: row;
|
64 | flex-wrap: wrap;
|
65 | justify-content: space-around;
|
66 | margin-bottom: 60px;
|
67 | }
|
68 | `
|
69 |
|
70 | AboutUs.defaultProps = {
|
71 | ...defaultProps,
|
72 | padding: true,
|
73 | constrained: true
|
74 | }
|
75 |
|
76 |
|
77 | export default AboutUs
|