@helpdice/ui 1.3.5 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1806,7 +1806,7 @@ var PopoverComponent = function PopoverComponent(_ref) {
1806
1806
  PopoverComponent.displayName = 'Popover';
1807
1807
  var Popover = withScale(PopoverComponent);
1808
1808
 
1809
- var _excluded = ["children", "line", "showTitle", "className", "onClick", "disableAutoClose"];
1809
+ var _excluded = ["children", "line", "showTitle", "className", "onClick", "selected", "disableAutoClose"];
1810
1810
  var PopoverItemComponent = function PopoverItemComponent(_ref) {
1811
1811
  var children = _ref.children,
1812
1812
  _ref$line = _ref.line,
@@ -1816,6 +1816,8 @@ var PopoverItemComponent = function PopoverItemComponent(_ref) {
1816
1816
  _ref$className = _ref.className,
1817
1817
  className = _ref$className === undefined ? '' : _ref$className,
1818
1818
  onClick = _ref.onClick,
1819
+ _ref$selected = _ref.selected,
1820
+ selected = _ref$selected === undefined ? false : _ref$selected,
1819
1821
  _ref$disableAutoClose = _ref.disableAutoClose,
1820
1822
  disableAutoClose = _ref$disableAutoClose === undefined ? false : _ref$disableAutoClose,
1821
1823
  props = _objectWithoutProperties(_ref, _excluded);
@@ -1839,6 +1841,9 @@ var PopoverItemComponent = function PopoverItemComponent(_ref) {
1839
1841
  onItemClick(event);
1840
1842
  };
1841
1843
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", _extends({
1844
+ style: {
1845
+ backgroundColor: selected ? '#efefef' : ''
1846
+ },
1842
1847
  onClick: clickHandler
1843
1848
  }, props, {
1844
1849
  className: _JSXStyle.dynamic([["190621384", [theme.palette.accents_5, SCALES.font(0.875), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.5), SCALES.pr(0.75), SCALES.pb(0.5), SCALES.pl(0.75), hasHandler ? 'pointer' : 'default', theme.palette.foreground, theme.palette.border, SCALES.height(0.0625), SCALES.mt(0.35), SCALES.mr(0), SCALES.mb(0.35), SCALES.ml(0), SCALES.width(1, '100%'), SCALES.font(0.925), theme.palette.foreground]]]) + " " + (props && props.className != null && props.className || classes || "")
@@ -3,6 +3,7 @@ interface Props {
3
3
  line?: boolean;
4
4
  showTitle?: boolean;
5
5
  disableAutoClose?: boolean;
6
+ selected?: boolean;
6
7
  onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
7
8
  }
8
9
  type NativeAttrs = Omit<React.HTMLAttributes<any>, keyof Props>;