UNPKG

@hackoregon/component-library

Version:

Official repo for Hack Oregon React component library

60 lines (54 loc) 2.32 kB
function _templateObject() { var data = _taggedTemplateLiteral(["\n padding: 0px 24px;\n @media (max-width: 640px) {\n padding: 0px 6px;\n }\n\n > p {\n width: 100%;\n max-width: 700px;\n font-size: 18px;\n margin-bottom: 1.5em;\n line-height: 1.8;\n\n &.transition {\n margin: 80px auto;\n }\n\n &.small {\n font-size: 14px;\n }\n }\n\n & > p,\n & > h1,\n & > h2,\n & > h3,\n & > h4,\n & > h5,\n & > h6 {\n margin: auto;\n @media (max-width: 640px) {\n width: 90%;\n }\n }\n"]); _templateObject = function _templateObject() { return data; }; return data; } function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } import React from "react"; import PropTypes from "prop-types"; import { css } from "emotion"; import Header from "../Navigation/Header"; import Footer from "../Footer/Footer"; import CollectionHero from "../Hero/CollectionHero"; var defaultStyles = css(_templateObject()); var PageLayout = function PageLayout(_ref) { var header = _ref.header, heroTitle = _ref.heroTitle, heroSubtitle = _ref.heroSubtitle, mainProjectColor = _ref.mainProjectColor, teamTitle = _ref.teamTitle, overlay = _ref.overlay, children = _ref.children, attribution = _ref.attribution; return React.createElement("div", null, header && React.createElement(Header, { title: "Civic homepage", mainProjectColor: mainProjectColor, overlay: overlay || false }), heroTitle && React.createElement(CollectionHero, { teamTitle: teamTitle, heroTitle: heroTitle, heroSubtitle: heroSubtitle, mainProjectColor: mainProjectColor }), React.createElement("div", { className: defaultStyles }, children), React.createElement(Footer, { attribution: attribution })); }; PageLayout.displayName = "PageLayout"; PageLayout.propTypes = { header: PropTypes.bool, overlay: PropTypes.bool, teamTitle: PropTypes.string, heroTitle: PropTypes.string, heroSubtitle: PropTypes.string, mainProjectColor: PropTypes.string, children: PropTypes.node, attribution: PropTypes.node }; PageLayout.defaultProps = { header: true }; export default PageLayout;