@finspringinnovations/fixeddepositsdk
v1.0.2
Published
FD SDK for React Native applications
Readme
FD SDK
A React Native SDK for FD Finance services, providing components and utilities for financial applications.
Installation
npm install fixeddepositsdk
# or
yarn add fixeddepositsdkUsage
Basic Setup
import { FDSDK, Home, BookFD } from 'fixeddepositsdk';
// Initialize the SDK
const sdk = new FDSDK({
apiBaseUrl: 'https://api.fd.com',
environment: 'production',
theme: {
primaryColor: '#1e40af',
secondaryColor: '#1f2937',
backgroundColor: '#f8fafc',
},
});
// Use components
function App() {
return (
<View>
<Home
onNavigate={(screen) => console.log(`Navigate to ${screen}`)}
title="FD Finance"
subtitle="Welcome to our services"
/>
</View>
);
}Available Components
Home Component
Main landing page component for the FD Finance SDK.
import { Home } from 'fixeddepositsdk';
<Home
onNavigate={(screen) => handleNavigation(screen)}
title="Custom Title"
subtitle="Custom Subtitle"
/>BookFD Component
Fixed Deposit booking component.
import { BookFD } from 'fixeddepositsdk';
<BookFD
onBookFD={(data) => handleFDBooking(data)}
onCancel={() => handleCancel()}
title="Book Fixed Deposit"
/>SDK Configuration
interface SDKConfig {
apiBaseUrl?: string;
theme?: {
primaryColor?: string;
secondaryColor?: string;
backgroundColor?: string;
};
environment?: 'development' | 'staging' | 'production';
}Utility Methods
// Get SDK version
const version = FDSDK.getVersion();
// Get platform information
const platformInfo = FDSDK.getPlatformInfo();
// Get current configuration
const config = sdk.getConfig();
// Update configuration
sdk.updateConfig({
apiBaseUrl: 'https://new-api.fd.com',
environment: 'staging',
});Development
Building the SDK
yarn buildRunning Tests
yarn testLinting
yarn lintLicense
MIT
