Skip to content

Latest commit

 

History

History
89 lines (60 loc) · 2.32 KB

File metadata and controls

89 lines (60 loc) · 2.32 KB

react-native-subscription-expired

A simple and easy to use subscription expired dialog for React Native apps.

Installation

You can install the package via npm:

npm install react-native-subscription-expired

or via yarn:

yarn add react-native-subscription-expired

Usage

Wrap your project with SubscriptionExpired at the top

import React from 'react';
import {RootNavigation} from './navigation/rootNavigation';
import {NavigationContainer} from '@react-navigation/native';
import {navigationRef} from './navigation/navigationService';

// subscription-expired import
import {SubscriptionExpiredView} from 'react-native-subscription-expired';

const App = () => {

  //app will be validate upto
  const subscriptionValidatonDate = new Date('2023-03-01');

  return (
    <SubscriptionExpiredView validTill={subscriptionValidatonDate}> //subscription-expired wrapping
    
    // your rest code here
      <GestureHandlerRootView style={{flex: 1}}>
        <NavigationContainer ref={navigationRef}>
           <RootNavigation />
         </NavigationContainer>
      </GestureHandlerRootView>
    </SubscriptionExpiredView>
  );
};

export default App;

Props

Property Type #Option Default Value Description
validTill Date Required undefined
Body JSX Optional
Footer JSX Optional
Heading JSX Optional

Example

You can find an example of how to use the package in the example folder.

Support

Please open an issue if you find any bug or have any feature request.

Contribution

Please feel free to open a pull request if you want to contribute to this project.

Licence

This project is licensed under the MIT License - see the LICENSE.md file for details.