@awsui/components-react
Version:
AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A
13 lines (12 loc) • 1.09 kB
JavaScript
import { __assign, __rest } from "tslib";
import React from 'react';
import InternalButtonDropdown from './internal';
import { getBaseProps } from '../internal/base-component';
import { useTelemetry } from '../internal/hooks/use-telemetry';
var ButtonDropdown = React.forwardRef(function (_a, ref) {
var items = _a.items, _b = _a.variant, variant = _b === void 0 ? 'normal' : _b, _c = _a.loading, loading = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.expandableGroups, expandableGroups = _e === void 0 ? false : _e, children = _a.children, onItemClick = _a.onItemClick, props = __rest(_a, ["items", "variant", "loading", "disabled", "expandableGroups", "children", "onItemClick"]);
useTelemetry('ButtonDropdown');
var baseProps = getBaseProps(props);
return (React.createElement(InternalButtonDropdown, __assign({}, baseProps, { ref: ref, items: items, variant: variant, loading: loading, disabled: disabled, expandableGroups: expandableGroups, onItemClick: onItemClick }), children));
});
export default ButtonDropdown;