@codacy/ui-components 0.52.1 → 0.53.0

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.
@@ -4,10 +4,12 @@ import { useDropdownTrigger } from './hooks';
4
4
  import { ChevronUpIcon, ChevronDownIcon } from '../../Icons';
5
5
  import { Button, IconAndText } from '../../';
6
6
  export var DropdownButtonTrigger = React.forwardRef(function (_ref, ref) {
7
- var _dropdownContext$valu;
7
+ var _dropdownContext$valu, _dropdownContext$valu2;
8
8
 
9
9
  var children = _ref.children,
10
- props = _objectWithoutProperties(_ref, ["children"]);
10
+ _ref$hideChevron = _ref.hideChevron,
11
+ hideChevron = _ref$hideChevron === void 0 ? false : _ref$hideChevron,
12
+ props = _objectWithoutProperties(_ref, ["children", "hideChevron"]);
11
13
 
12
14
  var dropdownContext = useDropdownTrigger();
13
15
  var rightIcon = useMemo(function () {
@@ -16,8 +18,8 @@ export var DropdownButtonTrigger = React.forwardRef(function (_ref, ref) {
16
18
  return /*#__PURE__*/React.createElement(Button, Object.assign({
17
19
  onClick: dropdownContext.onClick,
18
20
  ref: ref
19
- }, props), /*#__PURE__*/React.createElement(IconAndText, {
21
+ }, props), hideChevron ? children || ((_dropdownContext$valu = dropdownContext.value) === null || _dropdownContext$valu === void 0 ? void 0 : _dropdownContext$valu.toString()) : /*#__PURE__*/React.createElement(IconAndText, {
20
22
  toRight: true,
21
23
  icon: rightIcon
22
- }, children || ((_dropdownContext$valu = dropdownContext.value) === null || _dropdownContext$valu === void 0 ? void 0 : _dropdownContext$valu.toString())));
24
+ }, children || ((_dropdownContext$valu2 = dropdownContext.value) === null || _dropdownContext$valu2 === void 0 ? void 0 : _dropdownContext$valu2.toString())));
23
25
  });
@@ -10,6 +10,7 @@ export interface SelectTriggerProps extends TriggerProps, Omit<InputProps, 'read
10
10
  caption?: string | ((v?: DropdownValueType) => string);
11
11
  }
12
12
  export interface DropdownButtonTriggerProps extends TriggerProps, Omit<ButtonProps, 'onClick'> {
13
+ hideChevron?: boolean;
13
14
  }
14
15
  export interface DropdownLinkTriggerProps extends Omit<TriggerProps, 'onBlur' | 'onFocus'>, Omit<LinkProps, 'onClick'> {
15
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/ui-components",
3
- "version": "0.52.1",
3
+ "version": "0.53.0",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",