UNPKG

@randy.tarampi/jsx

Version:

Some common JSX components for www.randytarampi.ca

57 lines 1.59 kB
import PropTypes from "prop-types"; import React from "react"; import { Col } from "react-materialize"; import SectionWrapper from "./sectionWrapper"; export var RightPushSection = (_ref) => { var { printableType, type, hideOnPrint, showOnLetter, showOnA4, showOnLegal, hideOnScreen, verticallyAlignContent, className, children, sideContent } = _ref; var sectionClassNames = ["printable-section--push", "printable-section--push-right"]; return /*#__PURE__*/React.createElement(SectionWrapper, { printableType, type, hideOnPrint, showOnLetter, showOnA4, showOnLegal, hideOnScreen, verticallyAlignContent, className: sectionClassNames.concat(className).join(" ").trim() }, /*#__PURE__*/React.createElement("aside", { className: "col m3 printable-section__header hide-on-small-only" }, sideContent), /*#__PURE__*/React.createElement(Col, { m: 9, className: "printable-section__content" }, children)); }; RightPushSection.propTypes = { className: PropTypes.string, sideContent: PropTypes.node, printableType: PropTypes.string.isRequired, type: PropTypes.string.isRequired, hideOnPrint: PropTypes.bool, hideOnScreen: PropTypes.bool, showOnA4: PropTypes.bool, showOnLegal: PropTypes.bool, showOnLetter: PropTypes.bool, verticallyAlignContent: PropTypes.bool }; RightPushSection.defaultProps = { hideOnPrint: false, hideOnScreen: false, showOnA4: false, showOnLegal: false, showOnLetter: false, verticallyAlignContent: false }; export default RightPushSection;