@julo-ui/otp-input
Version:
React Input Component for entering sequences of digits
33 lines (30 loc) • 800 B
JavaScript
import {
OtpInputProvider
} from "./chunk-BPNQAI6D.mjs";
import {
otpInputCx
} from "./chunk-MT2UATKY.mjs";
import {
useOtpInput
} from "./chunk-7F2N6GEZ.mjs";
// src/OtpInput.tsx
import { cx, forwardRef, julo } from "@julo-ui/system";
import { jsx } from "react/jsx-runtime";
var OtpInput = forwardRef((props, ref) => {
const { className, children, ...resProps } = props;
const { getRootProps, ...context } = useOtpInput(resProps);
return /* @__PURE__ */ jsx(OtpInputProvider, { value: context, children: /* @__PURE__ */ jsx(
julo.div,
{
className: cx("julo-otp-input", className),
...getRootProps({}, ref),
__css: otpInputCx,
children
}
) });
});
OtpInput.displayName = "OtpInput";
var OtpInput_default = OtpInput;
export {
OtpInput_default
};