UNPKG

react-native-input-code-otp

Version:

react-native-input-code-otp is a high-performance and fully customizable OTP input component for React Native, inspired by @shadcn/ui.

36 lines (35 loc) 1.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TextInputOTP = void 0; var _reactNative = require("react-native"); var _useTextInputOtp = require("../hooks/use-text-input-otp.js"); var _textInput = require("./text-input.js"); var _react = require("react"); var _jsxRuntime = require("react/jsx-runtime"); const TextInputOTP = exports.TextInputOTP = /*#__PURE__*/(0, _react.forwardRef)(({ children, containerStyles, ...rest }, ref) => { return /*#__PURE__*/(0, _jsxRuntime.jsx)(_useTextInputOtp.TextInputOTPProvider, { ...rest, children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, { style: _reactNative.StyleSheet.flatten([styles.container, containerStyles]), children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_textInput.TextInput, { ref: ref, ...rest }), children] }) }); }); const styles = _reactNative.StyleSheet.create({ container: { flexDirection: 'row', alignItems: 'center', justifyContent: 'center', gap: 10 } }); //# sourceMappingURL=text-input-otp.js.map