UNPKG

@talend/react-components

Version:
33 lines 1.04 kB
import PropTypes from 'prop-types'; import CircularProgress from '../CircularProgress'; import VirtualizedList from '../VirtualizedList'; import theme from './Dropdown.module.scss'; import { jsx as _jsx } from "react/jsx-runtime"; export default function Dropdown(props) { return /*#__PURE__*/_jsx("div", { className: theme.dropdown, style: { height: props.height }, children: props.isLoading ? /*#__PURE__*/_jsx("div", { className: theme.loading, children: /*#__PURE__*/_jsx(CircularProgress, {}) }) : /*#__PURE__*/_jsx(VirtualizedList, { type: "tc-multiselect-dropdown", rowHeight: props.renderItem.rowHeight, rowRenderers: { 'tc-multiselect-dropdown': props.renderItem }, collection: props.items, onRowClick: props.onRowClick }) }); } Dropdown.propTypes = { isLoading: PropTypes.bool, height: PropTypes.number, renderItem: PropTypes.func, items: PropTypes.array, onRowClick: PropTypes.func }; //# sourceMappingURL=Dropdown.container.js.map