UNPKG

react-lightning-design-system

Version:

Salesforce Lightning Design System components built with React

33 lines (31 loc) 1.16 kB
import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; var _excluded = ["tag", "category", "type", "align", "truncate", "section", "children", "className"]; import React from 'react'; import classnames from 'classnames'; /** * */ /** * */ export var Text = function Text(_ref) { var tag = _ref.tag, category = _ref.category, type = _ref.type, align = _ref.align, truncate = _ref.truncate, section = _ref.section, children = _ref.children, className = _ref.className, props = _objectWithoutProperties(_ref, _excluded); var textClassNames = classnames(type && category ? "slds-text-".concat(category, "_").concat(type) : undefined, category === 'title' && !type ? "slds-text-".concat(category) : undefined, align ? "slds-text-align_".concat(align) : undefined, { 'slds-truncate': truncate, 'slds-section-title_divider': section }, className); var Tag = tag || 'p'; return /*#__PURE__*/React.createElement(Tag, _extends({}, props, { className: textClassNames }), children); }; //# sourceMappingURL=Text.js.map