UNPKG

@salesforce/design-system-react

Version:

Salesforce Lightning Design System for React

36 lines (32 loc) 1.01 kB
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */ /* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */ // # List Item Label Component // ## Dependencies // ### React import React from 'react'; import PropTypes from 'prop-types'; // ## Constants import { LIST_ITEM_LABEL } from '../../../utilities/constants'; /** * Component description. */ var ListItemLabel = function ListItemLabel(_ref) { var _ref$label = _ref.label, label = _ref$label === void 0 ? '' : _ref$label, icon = _ref.icon; return /*#__PURE__*/React.createElement("span", { className: "slds-truncate", title: label }, icon, label); }; ListItemLabel.displayName = LIST_ITEM_LABEL; ListItemLabel.propTypes = { data: PropTypes.object, icon: PropTypes.node, index: PropTypes.number, inverted: PropTypes.bool, isSelected: PropTypes.bool, label: PropTypes.string, value: PropTypes.any }; export default ListItemLabel; //# sourceMappingURL=item-label.js.map