braid-design-system
Version:
Themeable design system for the SEEK Group
30 lines (29 loc) • 863 B
JavaScript
;
const jsxRuntime = require("react/jsx-runtime");
const lib_playroom_playroomState_cjs = require("../../playroom/playroomState.cjs");
const lib_components_private_validateTabIndex_cjs = require("../private/validateTabIndex.cjs");
const lib_components_Dropdown_Dropdown_cjs = require("./Dropdown.cjs");
const Dropdown = ({
stateName,
value,
onChange,
tabIndex,
...restProps
}) => {
const [state, handleChange] = lib_playroom_playroomState_cjs.useFallbackState(
stateName,
value,
onChange,
""
);
return /* @__PURE__ */ jsxRuntime.jsx(
lib_components_Dropdown_Dropdown_cjs.Dropdown,
{
value: state,
onChange: handleChange,
tabIndex: lib_components_private_validateTabIndex_cjs.validTabIndexes.includes(tabIndex) ? tabIndex : void 0,
...restProps
}
);
};
exports.Dropdown = Dropdown;