@makeen.io/material-ui-kit
Version:
Makeen UI components kit. Based on material-ui.
40 lines (22 loc) • 3.72 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";function _templateObject8() {var data = _taggedTemplateLiteral(["\n ", ";\n"]);_templateObject8 = function _templateObject8() {return data;};return data;}function _templateObject7() {var data = _taggedTemplateLiteral(["\n ", "\n "]);_templateObject7 = function _templateObject7() {return data;};return data;}function _templateObject6() {var data = _taggedTemplateLiteral(["\n ", "\n"]);_templateObject6 = function _templateObject6() {return data;};return data;}function _templateObject5() {var data = _taggedTemplateLiteral(["\n margin-left: 0;\n"]);_templateObject5 = function _templateObject5() {return data;};return data;}function _templateObject4() {var data = _taggedTemplateLiteral(["\n margin-left: auto;\n"]);_templateObject4 = function _templateObject4() {return data;};return data;}function _templateObject3() {var data = _taggedTemplateLiteral(["\n height: 64px;\n padding: 0 24px;\n border-bottom: 1px solid #eee;\n display: flex;\n align-items: center;\n"]);_templateObject3 = function _templateObject3() {return data;};return data;}function _templateObject2() {var data = _taggedTemplateLiteral(["\n padding: 0 !important;\n ", ";\n"]);_templateObject2 = function _templateObject2() {return data;};return data;}function _templateObject() {var data = _taggedTemplateLiteral(["\n font-size: 15px;\n font-weight: bold;\n"]);_templateObject = function _templateObject() {return data;};return data;}import React from "react";
import { Card, CardContent, Typography } from "@material-ui/core";
import styled, { css } from "styled-components";
var CardTitle = styled(Typography)(_templateObject());
var CardContentWrapper = styled(function (_ref) {var customStyle = _ref.customStyle,props = _objectWithoutProperties(_ref, ["customStyle"]);return /*#__PURE__*/React.createElement(CardContent, _extends({}, props));})(_templateObject2(),
function (props) {return props.customStyle ? props.customStyle(props) : "";});
var CardHeaderSection = styled.div(_templateObject3());
var CardActions = styled.div(_templateObject4());
var CardStartActions = styled.div(_templateObject5());
var CardWrapper = styled(function (_ref2) {var cardStyle = _ref2.cardStyle,props = _objectWithoutProperties(_ref2, ["cardStyle"]);return /*#__PURE__*/React.createElement(Card, _extends({}, props));})(_templateObject6(),
function (props) {return css(_templateObject7(),
props.cardStyle ? props.cardStyle(props) : "");});
var ContentBodyWrapper = styled.div(_templateObject8(),
function (props) {return props.contentStyle ? props.contentStyle(props) : "";});
export default (function (_ref3) {var customStyle = _ref3.customStyle,contentStyle = _ref3.contentStyle,props = _objectWithoutProperties(_ref3, ["customStyle", "contentStyle"]);return /*#__PURE__*/React.createElement(CardWrapper, _extends({}, props), /*#__PURE__*/
React.createElement(CardContentWrapper, { customStyle: customStyle },
(props.title || props.actions || props.beforeactions) && /*#__PURE__*/React.createElement(CardHeaderSection, { sectionStyle: props.headerCustomStyle }, /*#__PURE__*/
React.createElement(CardTitle, { variant: "h6" }, props.title),
props.beforeactions && /*#__PURE__*/React.createElement(CardStartActions, null, props.beforeactions), /*#__PURE__*/
React.createElement(CardActions, null, props.actions)),
contentStyle ? /*#__PURE__*/React.createElement(ContentBodyWrapper, { contentStyle: contentStyle }, props.children) : props.children));});
//# sourceMappingURL=index.js.map