discountcoupon-library
v1.0.26
Published
discount image
Downloads
5
Readme
Discount Coupon Library
The Discount Coupon Library is a package that provides a reusable component to display discount coupons in React applications.
Installation
To install the Discount Coupon Library, use your preferred package manager:
npm install discountcoupon-library
or
yarn add discountcoupon-library
Usage
Import the DiscountCoupon component into your React application as shown below: import { DiscountCoupon } from 'discountcoupon-library';
Props:
The DiscountCoupon component takes the following props:
couponData: An object containing the coupon information with the following properties:
code: The coupon code (string) discount: The discount amount (string) description: Description of the coupon (string) image: Path to the coupon image (string) onShare: Function to handle the share button click event.
onLearnMore: Function to handle the 'Know More' link click event.
Styling
The library includes predefined CSS classes to style the coupon component. You can also customize these styles according to your preferences.