UNPKG

@navinc/base-react-components

Version:
35 lines (33 loc) 1.57 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.PageContainer = void 0; const styled_components_1 = __importDefault(require("styled-components")); const minimumGutterDesktop = 32; const minimumGutterMobile = 16; const FlexContainer = styled_components_1.default.section.withConfig({ displayName: "brc-sc-FlexContainer", componentId: "brc-sc-44akr6" }) ` display: flex; flex-flow: ${(props) => props.flexFlow || 'row wrap'}; place-content: ${(props) => props.alignContent || 'flex-start'} ${(props) => props.justifyContent || 'flex-start'}; align-items: ${(props) => props.alignItems || 'flex-start'}; flex: ${(props) => props.flex || ''}; max-width: 100%; `; exports.PageContainer = (0, styled_components_1.default)(FlexContainer).attrs(() => ({ as: 'main' })) ` flex: 1 1 100%; width: 100%; align-self: stretch; padding: 40px calc((50% - (${({ theme }) => theme.contentWidth}px / 2))) 40px calc((50% - (${({ theme }) => theme.contentWidth}px / 2))); @media (max-width: ${({ theme }) => theme.contentWidth + minimumGutterDesktop * 2}px) { padding-right: ${minimumGutterDesktop}px; padding-left: ${minimumGutterDesktop}px; } @media (max-width: ${({ theme }) => theme.media.small}) { padding: 24px ${minimumGutterMobile}px 24px ${minimumGutterMobile}px; } `; exports.PageContainer.displayName = 'PageContainer'; //# sourceMappingURL=page-container.js.map