@makeen.io/material-ui-kit
Version:
Makeen UI components kit. Based on material-ui.
43 lines (19 loc) • 2.3 kB
JavaScript
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";function _templateObject() {var data = _taggedTemplateLiteral(["\n width: 626px;\n\n ", " {\n width: 100%;\n margin: 16px 0;\n }\n"]);_templateObject = function _templateObject() {return data;};return data;}import React from "react";
import Box from "@material-ui/core/Box";
import { Button, WidgetCard } from "../../atoms";
import styled from "styled-components";
var Wrapper = styled.div(_templateObject(),
function (props) {return props.theme.breakpoints.down("sm");});
var cardStyle = function cardStyle() {return "\n height: 351px;\n display: flex;\n justify-content: center;\n align-items: center;\n";};
var customStyle = function customStyle(props) {return "\n margin-top: -16px;\n & .icon-block {\n margin-bottom: 10px;\n }\n & .header-text {\n font-size: 26px;\n font-weight: bold;\n margin-bottom: 5px;\n }\n & .sub-text {\n font-size: 15px;\n color: ".concat(
props.theme.palette.text.secondary, ";\n }\n");};
export default (function (_ref) {var children = _ref.children,headerText = _ref.headerText,subText = _ref.subText,actionText = _ref.actionText,onActionClick = _ref.onActionClick,_ref$noAction = _ref.noAction,noAction = _ref$noAction === void 0 ? false : _ref$noAction,CustomAction = _ref.customAction;
return /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/
React.createElement(WidgetCard, { cardStyle: cardStyle, customStyle: customStyle }, /*#__PURE__*/
React.createElement(Box, { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center" }, /*#__PURE__*/
React.createElement("div", { className: "icon-block" }, children), /*#__PURE__*/
React.createElement("div", { className: "header-text" }, headerText), /*#__PURE__*/
React.createElement("div", { className: "sub-text" }, subText))),
!noAction ? /*#__PURE__*/React.createElement(Box, { display: "flex", justifyContent: "flex-end", mt: 2 }, !CustomAction ? /*#__PURE__*/React.createElement(Button, { size: "medium", palette: "info", onClick: onActionClick }, actionText) : /*#__PURE__*/React.createElement(CustomAction, null)) : null);
});
//# sourceMappingURL=index.js.map