UNPKG

@cerberus-design/react

Version:

The Cerberus Design React component library.

18 lines (13 loc) 719 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const jsxRuntime = require('react/jsx-runtime'); const parts = require('./parts.cjs'); function PinInput(props) { const { size, ...rootProps } = props; const count = rootProps.count ?? 3; return /* @__PURE__ */ jsxRuntime.jsxs(parts.PinInputParts.Root, { placeholder: "", size, ...rootProps, children: [ /* @__PURE__ */ jsxRuntime.jsx(parts.PinInputParts.Control, { children: Array.from({ length: count }, (_, index) => /* @__PURE__ */ jsxRuntime.jsx(parts.PinInputParts.Input, { index, size }, index)) }), /* @__PURE__ */ jsxRuntime.jsx(parts.PinInputParts.HiddenInput, {}) ] }); } exports.PinInput = PinInput;