braid-design-system
Version:
Themeable design system for the SEEK Group
32 lines (31 loc) • 712 B
JavaScript
import { jsx } from "react/jsx-runtime";
import { useFallbackState } from "../../playroom/playroomState.mjs";
import { validTabIndexes } from "../private/validateTabIndex.mjs";
import { PasswordField as PasswordField$1 } from "./PasswordField.mjs";
const PasswordField = ({
stateName,
value,
onChange,
tabIndex,
...restProps
}) => {
const [state, handleChange] = useFallbackState(
stateName,
value,
onChange,
""
);
return /* @__PURE__ */ jsx(
PasswordField$1,
{
value: state,
onChange: handleChange,
autoComplete: "off",
tabIndex: validTabIndexes.includes(tabIndex) ? tabIndex : void 0,
...restProps
}
);
};
export {
PasswordField
};