@olo/pay-react-native
Version:
Olo Pay React Native SDK
40 lines (34 loc) • 978 B
text/typescript
// Copyright © 2022 Olo Inc. All rights reserved.
// This software is made available under the Olo Pay SDK License (See LICENSE.md file)
import {
codegenNativeComponent,
type ViewProps,
type HostComponent,
} from 'react-native';
import type {
DirectEventHandler,
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
// Google Pay Button Config
export interface GooglePayButtonConfig {
buttonType?: string;
buttonTheme?: string;
cornerRadius?: Int32;
}
// Apple Pay Button Config
export interface ApplePayButtonConfig {
buttonType?: string;
buttonStyle?: string;
cornerRadius?: Int32;
}
export interface NativeProps extends ViewProps {
isEnabled?: WithDefault<boolean, true>;
googlePayConfig?: GooglePayButtonConfig;
applePayConfig?: ApplePayButtonConfig;
// Events
onClickedEvent?: DirectEventHandler<null>;
}
export default codegenNativeComponent<NativeProps>(
'DigitalWalletButton'
) as HostComponent<NativeProps>;