UNPKG

@geezee/react-ui

Version:

Modern and minimalist React UI library.

33 lines (30 loc) 1.99 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 withDefaults from '../utils/with-defaults'; import useTheme from '../styles/use-theme'; var defaultProps = { title: 'Title', content: '', className: '' }; var Description = function Description(_ref) { var title = _ref.title, content = _ref.content, className = _ref.className, props = _objectWithoutProperties(_ref, ["title", "content", "className"]); var theme = useTheme(); return /*#__PURE__*/React.createElement("dl", _extends({}, props, { className: _JSXStyle.dynamic([["4169895831", [theme.palette.accents_5, theme.palette.foreground]]]) + " " + (props && props.className != null && props.className || className || "") }), /*#__PURE__*/React.createElement("dt", { className: _JSXStyle.dynamic([["4169895831", [theme.palette.accents_5, theme.palette.foreground]]]) }, title), /*#__PURE__*/React.createElement("dd", { className: _JSXStyle.dynamic([["4169895831", [theme.palette.accents_5, theme.palette.foreground]]]) }, content), /*#__PURE__*/React.createElement(_JSXStyle, { id: "4169895831", dynamic: [theme.palette.accents_5, theme.palette.foreground] }, "dl.__jsx-style-dynamic-selector{margin:0;}dt.__jsx-style-dynamic-selector{height:0.875rem;line-height:0.875rem;font-size:0.75rem;margin-bottom:0.5rem;text-transform:uppercase;white-space:nowrap;color:".concat(theme.palette.accents_5, ";display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}dd.__jsx-style-dynamic-selector{margin:0;font-size:0.875rem;line-height:1rem;color:").concat(theme.palette.foreground, ";font-weight:500;}dd.__jsx-style-dynamic-selector p,dt.__jsx-style-dynamic-selector p{margin:0;}"))); }; var MemoDescription = React.memo(Description); export default withDefaults(MemoDescription, defaultProps);