UNPKG

@geezee/react-ui

Version:

Modern and minimalist React UI library.

19 lines (17 loc) 663 B
import React from 'react'; function ExpandIcon(_ref) { var onExpand = _ref.onExpand, record = _ref.record, expanded = _ref.expanded, expandable = _ref.expandable; var iconPrefix = "table-row-expand-icon"; return /*#__PURE__*/React.createElement("button", { type: "button", onClick: function onClick(e) { onExpand(record, e); e.stopPropagation(); }, className: "".concat(iconPrefix, " ").concat(!expandable ? iconPrefix + '-spaced' : '', " ").concat(expandable && expanded ? iconPrefix + '-expanded' : '', " ").concat(expandable && !expanded ? iconPrefix + '-collapsed' : '') }); } export default ExpandIcon;