UNPKG

smart-react-components

Version:

React UI library, wide variety of editable ready to use Styled and React components.

34 lines (25 loc) 1.09 kB
'use strict'; function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var styled = require('styled-components'); var styled__default = _interopDefault(styled); var Div = require('./element/Div.js'); var ModalBody = styled__default(Div).attrs(({ flex = "1 1 auto", overflow = "auto", webkitOverflowScrolling = "touch" }) => ({ flex, overflow, webkitOverflowScrolling }))(({ theme, topBorder, bottomBorder }) => ` box-sizing: border-box; padding: ${theme.src.modal.modalContentPadding.y} ${theme.src.modal.modalContentPadding.x}; > { header, h1, h2, h3, h4, h5, h6, p, hr { margin-top: 0; margin-bottom: ${theme.src.length["3"]}; &:last-child { margin-bottom: 0; } } } ${topBorder ? ` border-top: solid 1px ${theme.src.modal.modalContentBorderColor}; ` : ""} ${bottomBorder ? ` border-bottom: solid 1px ${theme.src.modal.modalContentBorderColor}; ` : ""} `); exports.ModalBody = ModalBody;