UNPKG

@makeen.io/material-ui-kit

Version:
51 lines (25 loc) 3.47 kB
import _extends from "@babel/runtime/helpers/extends";import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";function _templateObject4() {var data = _taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n // color: ", ";\n color: #c5cee0;\n font-weight: bold;\n font-size: 16px;\n"]);_templateObject4 = function _templateObject4() {return data;};return data;}function _templateObject3() {var data = _taggedTemplateLiteral(["\n border-color: rgba(88, 75, 75, 0.06);\n padding: 15px;\n color: #8f9bb3;\n"]);_templateObject3 = function _templateObject3() {return data;};return data;}function _templateObject2() {var data = _taggedTemplateLiteral(["\n padding: 16px;\n display: flex;\n align-items: center;\n\n .MuiButtonBase-root {\n margin-left: auto;\n }\n\n .title.MuiTypography-root {\n width: 100%;\n font-size: 18px;\n font-weight: bold;\n }\n"]);_templateObject2 = function _templateObject2() {return data;};return data;}function _templateObject() {var data = _taggedTemplateLiteral(["\n padding: 8px 24px;\n"]);_templateObject = function _templateObject() {return data;};return data;}import React from "react"; import Dialog from "@material-ui/core/Dialog"; import DialogActions from "@material-ui/core/DialogActions"; import DialogContent from "@material-ui/core/DialogContent"; import DialogTitle from "@material-ui/core/DialogTitle"; import IconButton from "@material-ui/core/IconButton"; import Typography from "@material-ui/core/Typography"; import CloseIcon from "@material-ui/icons/Close"; import styled from "styled-components"; var DialogActionsWrapper = styled(DialogActions)(_templateObject()); var DialogTitleWrapper = styled(DialogTitle)(_templateObject2()); var CustomDialogContent = styled(DialogContent)(_templateObject3()); var StyledDialogTitleCloseButton = styled(IconButton)(_templateObject4(), function (_ref) {var theme = _ref.theme;return theme.palette.grey[500];}); var CustomDialogTitle = function CustomDialogTitle(_ref2) {var children = _ref2.children,onClose = _ref2.onClose,other = _objectWithoutProperties(_ref2, ["children", "onClose"]);return /*#__PURE__*/React.createElement(DialogTitleWrapper, _extends({ disableTypography: true }, other), /*#__PURE__*/ React.createElement(Typography, { className: "title", variant: "subtitle1" }, children), /*#__PURE__*/ React.createElement(StyledDialogTitleCloseButton, { "aria-label": "close", onClick: function onClick(e) {return onClose && onClose(e, "backdropClick");} }, /*#__PURE__*/ React.createElement(CloseIcon, null)));}; export default (function (_ref3) {var onClose = _ref3.onClose,id = _ref3.id,maxWidth = _ref3.maxWidth,open = _ref3.open,title = _ref3.title,children = _ref3.children,actions = _ref3.actions,props = _objectWithoutProperties(_ref3, ["onClose", "id", "maxWidth", "open", "title", "children", "actions"]); return /*#__PURE__*/React.createElement(Dialog, _extends({ onClose: onClose, "aria-labelledby": id, fullWidth: true, maxWidth: maxWidth || "md", open: open }, props), /*#__PURE__*/ React.createElement(CustomDialogTitle, { id: "customized-dialog-title", onClose: onClose }, title), /*#__PURE__*/ React.createElement(CustomDialogContent, { dividers: true }, children), /*#__PURE__*/ React.createElement(DialogActionsWrapper, null, actions)); }); //# sourceMappingURL=index.js.map