15 lines
393 B
TypeScript
15 lines
393 B
TypeScript
type CouponBadgeProps = {
|
|
amount: number | string;
|
|
className?: string;
|
|
/** 权益标签文案,默认「餐券」;首页使用「好客权益」 */
|
|
label?: string;
|
|
};
|
|
|
|
export default function CouponBadge({ amount, className = '', label = '餐券' }: CouponBadgeProps) {
|
|
return (
|
|
<span className={`coupon-badge ${className}`.trim()}>
|
|
¥{amount}{label}
|
|
</span>
|
|
);
|
|
}
|