CouponAndGv
A specialized component for displaying coupon and gift voucher information.
Installation
npm install @cleartrip/ct-design-coupon-and-gv
# or
pnpm add @cleartrip/ct-design-coupon-and-gv
Peer dependencies
# Required for all targets
npm install react
# Web only
npm install react-dom
# React Native only
npm install react-native
Usage
Basic
import { CouponAndGv } from '@cleartrip/ct-design-coupon-and-gv';
function Example() {
return (
<CouponAndGv>
{/* Basic usage */}
</CouponAndGv>
);
}
Props
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
heading | string | — | No | heading property |
activeTabId | string | — | No | activeTabId property |
discountCallout | ICouponAndGVCallout | — | No | discountCallout property |
onTabChange | `(tabId: string | number) => void` | — | No |
coupon | ICoupon | — | No | coupon property |
gv | IGiftVoucher | — | ✅ Yes | gv property |
Accessibility
- The component follows accessibility best practices
- Ensure proper ARIA attributes are provided where needed
- Test with screen readers to ensure usability
Migration
If migrating from a previous version:
- import { CouponAndGv } from 'yagami/core/components';
+ import { CouponAndGv } from '@cleartrip/ct-design-coupon-and-gv';