1 | const _excluded = ["className", "busy", "visible", "icon", "spinner"];
|
2 |
|
3 | function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4 |
|
5 | function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
6 |
|
7 | import cn from 'classnames';
|
8 | import * as React from 'react';
|
9 | import { Spinner, caretDown } from './Icon';
|
10 |
|
11 | const DropdownCaret = _ref => {
|
12 | let {
|
13 | className,
|
14 | busy,
|
15 | visible,
|
16 | icon = caretDown,
|
17 | spinner = Spinner
|
18 | } = _ref,
|
19 | props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
20 |
|
21 | return React.createElement("span", _extends({}, props, {
|
22 | "aria-hidden": "true",
|
23 | className: cn(className, 'rw-btn rw-picker-caret')
|
24 | }), busy ? spinner : visible ? icon : null);
|
25 | };
|
26 |
|
27 | export default DropdownCaret; |
\ | No newline at end of file |