UNPKG

@geezee/react-ui

Version:

Modern and minimalist React UI library.

26 lines (23 loc) 1.33 kB
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import _JSXStyle from "styled-jsx/style"; import React from 'react'; import useTheme from '../styles/use-theme'; import withDefaults from '../utils/with-defaults'; var defaultProps = { className: '' }; var CardContent = function CardContent(_ref) { var className = _ref.className, children = _ref.children, props = _objectWithoutProperties(_ref, ["className", "children"]); var theme = useTheme(); return /*#__PURE__*/React.createElement("div", _extends({}, props, { className: _JSXStyle.dynamic([["1518121670", [theme.layout.gap, theme.layout.gap]]]) + " " + (props && props.className != null && props.className || "content ".concat(className)) }), children, /*#__PURE__*/React.createElement(_JSXStyle, { id: "1518121670", dynamic: [theme.layout.gap, theme.layout.gap] }, ".content.__jsx-style-dynamic-selector{width:100%;padding:".concat(theme.layout.gap, " ").concat(theme.layout.gap, ";}.content.__jsx-style-dynamic-selector>*:first-child{margin-top:0;}.content.__jsx-style-dynamic-selector>*:last-child{margin-bottom:0;}"))); }; var MemoCardContent = React.memo(CardContent); export default withDefaults(MemoCardContent, defaultProps);