UNPKG

@b2bfinance/products-embed

Version:
50 lines (46 loc) 1.34 kB
import { Drawer } from "@material-ui/core"; import { makeStyles } from "@material-ui/styles"; import React from "react"; import ProductMoreInfoBody from "./ProductMoreInfoBody"; import ProductMoreInfoFooter from "./ProductMoreInfoFooter"; import ProductMoreInfoHeader from "./ProductMoreInfoHeader"; var useStyles = makeStyles(function (theme) { return { paper: { width: "60%", "@media(max-width: 1280px)": { width: "70%" }, "@media(max-width: 960px)": { width: "85%" } } }; }); export default (function (_ref) { var open = _ref.open, onClose = _ref.onClose, title = _ref.title, links = _ref.links, brand = _ref.brand, disclaimer = _ref.disclaimer, description = _ref.description, detailed = _ref.detailed; var classes = useStyles(); return React.createElement( Drawer, { classes: classes, anchor: "right", open: open, onClose: onClose }, React.createElement(ProductMoreInfoHeader, { brand: brand, title: title, logo: links.logo, onClose: onClose }), React.createElement(ProductMoreInfoBody, { description: description, detailed: detailed, disclaimer: disclaimer }), React.createElement(ProductMoreInfoFooter, { link: links.apply, onClose: onClose }) ); });