@olo/pay-react-native
Version:
Olo Pay React Native SDK
34 lines (32 loc) • 1.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = usePaymentCardCvvViewManager;
var _react = require("react");
// Copyright © 2022 Olo Inc. All rights reserved.
// This software is made available under the Olo Pay SDK License (See LICENSE.md file)
// Load commands for Fabric
const Commands = require('../components/specs/PaymentCardCvvViewNativeComponent').Commands;
function usePaymentCardCvvViewManager() {
const blur = (0, _react.useCallback)(ref => {
Commands.blur(ref.current);
}, []);
const focus = (0, _react.useCallback)(ref => {
Commands.focus(ref.current);
}, []);
const clear = (0, _react.useCallback)(ref => {
Commands.clear(ref.current);
}, []);
const createCvvUpdateToken = (0, _react.useCallback)(ref => {
// Result comes via onCvvTokenResult event
Commands.createCvvUpdateToken(ref.current);
}, []);
return {
blur,
clear,
createCvvUpdateToken,
focus
};
}
//# sourceMappingURL=usePaymentCardCvvViewManager.js.map