UNPKG

@randy.tarampi/jsx

Version:

Some common JSX components for www.randytarampi.ca

56 lines 1.48 kB
import PropTypes from "prop-types"; import React from "react"; import { Col } from "react-materialize"; import SectionWrapper from "./sectionWrapper"; export var RawHtmlLetterSection = (_ref) => { var { printableType, type, rawHtml, hideOnPrint, showOnLetter, showOnA4, showOnLegal, hideOnScreen, verticallyAlignContent, className } = _ref; var sectionClassNames = ["printable-section__raw-html"]; return /*#__PURE__*/React.createElement(SectionWrapper, { printableType, type, hideOnPrint, showOnLetter, showOnA4, showOnLegal, hideOnScreen, verticallyAlignContent, className: sectionClassNames.concat(className).join(" ").trim() }, /*#__PURE__*/React.createElement(Col, { className: "printable-section__content", dangerouslySetInnerHtml: { __html: rawHtml } })); }; RawHtmlLetterSection.propTypes = { className: PropTypes.string, rawHtml: PropTypes.string.isRequired, 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 }; RawHtmlLetterSection.defaultProps = { hideOnPrint: false, hideOnScreen: false, showOnA4: false, showOnLegal: false, showOnLetter: false, verticallyAlignContent: false }; export default RawHtmlLetterSection;