fix: rename omnibusRate prop and enable for regular RateCard
This commit is contained in:
@@ -17,7 +17,7 @@ const meta: Meta<typeof CampaignRateCard> = {
|
||||
bannerText: { control: 'text' },
|
||||
rate: { control: 'object' },
|
||||
memberRate: { control: 'object' },
|
||||
referenceRate: { control: 'object' },
|
||||
omnibusRate: { control: 'object' },
|
||||
comparisonRate: { control: 'object' },
|
||||
approximateRate: { control: 'object' },
|
||||
},
|
||||
@@ -42,7 +42,7 @@ export const Default: Story = {
|
||||
label: 'Approx.',
|
||||
unit: 'EUR',
|
||||
},
|
||||
referenceRate: {
|
||||
omnibusRate: {
|
||||
price: '249',
|
||||
label: 'Lowest past price (last 30 days)',
|
||||
unit: 'EUR',
|
||||
@@ -111,7 +111,7 @@ export const CampaignOmnibus: Story = {
|
||||
label: 'Approx.',
|
||||
unit: 'EUR',
|
||||
},
|
||||
referenceRate: {
|
||||
omnibusRate: {
|
||||
price: '101',
|
||||
label: 'Lowest past price (last 30 days)',
|
||||
unit: 'EUR',
|
||||
|
||||
@@ -15,7 +15,7 @@ interface CampaignRateCardProps {
|
||||
bannerText: string
|
||||
rate: Rate
|
||||
memberRate?: Rate
|
||||
referenceRate: Rate
|
||||
omnibusRate?: Rate
|
||||
comparisonRate?: Omit<Rate, 'label'>
|
||||
isHighlightedRate?: boolean
|
||||
approximateRate?: Rate
|
||||
@@ -33,7 +33,7 @@ export default function CampaignRateCard({
|
||||
memberRate,
|
||||
approximateRate,
|
||||
comparisonRate,
|
||||
referenceRate,
|
||||
omnibusRate,
|
||||
bannerText,
|
||||
isHighlightedRate,
|
||||
handleChange,
|
||||
@@ -134,14 +134,14 @@ export default function CampaignRateCard({
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
{referenceRate ? (
|
||||
{omnibusRate ? (
|
||||
<footer className={styles.footer}>
|
||||
<Typography variant="Tag/sm">
|
||||
<p>{referenceRate.label}</p>
|
||||
<p>{omnibusRate.label}</p>
|
||||
</Typography>
|
||||
<Typography variant="Tag/sm">
|
||||
<p>
|
||||
{referenceRate.price} {referenceRate.unit}
|
||||
{omnibusRate.price} {omnibusRate.unit}
|
||||
</p>
|
||||
</Typography>
|
||||
</footer>
|
||||
|
||||
@@ -16,6 +16,7 @@ const meta: Meta<typeof RegularRateCard> = {
|
||||
paymentTerm: { control: 'text' },
|
||||
rate: { control: 'object' },
|
||||
memberRate: { control: 'object' },
|
||||
omnibusRate: { control: 'object' },
|
||||
approximateRate: { control: 'object' },
|
||||
},
|
||||
}
|
||||
@@ -45,6 +46,11 @@ export const Default: Story = {
|
||||
label: 'Approx.',
|
||||
unit: 'EUR',
|
||||
},
|
||||
omnibusRate: {
|
||||
label: 'Lowest past price (last 30 days)',
|
||||
price: '169',
|
||||
unit: 'EUR',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ interface RegularRateCardProps {
|
||||
paymentTerm: string
|
||||
rate?: Rate
|
||||
memberRate?: Rate
|
||||
omnibusRate?: Rate
|
||||
approximateRate?: Rate
|
||||
hidePublicRate?: boolean
|
||||
handleChange: () => void
|
||||
@@ -28,6 +29,7 @@ export default function RegularRateCard({
|
||||
rateTitle,
|
||||
paymentTerm,
|
||||
approximateRate,
|
||||
omnibusRate,
|
||||
rate,
|
||||
memberRate,
|
||||
hidePublicRate,
|
||||
@@ -112,6 +114,18 @@ export default function RegularRateCard({
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
{omnibusRate ? (
|
||||
<footer className={styles.footer}>
|
||||
<Typography variant="Tag/sm">
|
||||
<p>{omnibusRate.label}</p>
|
||||
</Typography>
|
||||
<Typography variant="Tag/sm">
|
||||
<p>
|
||||
{omnibusRate.price} {omnibusRate.unit}
|
||||
</p>
|
||||
</Typography>
|
||||
</footer>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
|
||||
Reference in New Issue
Block a user