Files
web/packages/design-system/lib/components/RateCard/Campaign/Campaign.stories.tsx
Rasmus Langvad ca6cc5ab6c Merged in feat/SW-3636-storybook-structure (pull request #3309)
feat(SW-3636): Storybook structure

* New sections in Storybook sidebar

* Group Storybook content files and add token files for spacing, border radius and shadows


Approved-by: Joakim Jäderberg
2025-12-08 12:35:14 +00:00

146 lines
3.1 KiB
TypeScript

import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import CampaignRateCard from '.'
const meta: Meta<typeof CampaignRateCard> = {
title: 'Product Components/RateCard/Campaign',
component: CampaignRateCard,
decorators: [
(Story) => (
<div style={{ maxWidth: '400px' }}>
<Story />
</div>
),
],
argTypes: {
rateTitle: { control: 'text' },
paymentTerm: { control: 'text' },
bannerText: { control: 'text' },
rate: { control: 'object' },
memberRate: { control: 'object' },
omnibusRate: { control: 'object' },
comparisonRate: { control: 'object' },
approximateRate: { control: 'object' },
rateTermDetails: { control: 'object' },
},
}
export default meta
type Story = StoryObj<typeof CampaignRateCard>
export const Default: Story = {
args: {
rateTitle: 'NON-REFUNDABLE',
paymentTerm: 'PAY NOW',
bannerText: 'Campaign ∙ Breakfast included',
rate: {
label: "Valentine's Special",
price: '198',
unit: 'EUR/NIGHT',
},
approximateRate: {
price: '198',
label: 'Approx.',
unit: 'EUR',
},
omnibusRate: {
price: '249',
label: 'Lowest past price (last 30 days)',
unit: 'EUR',
},
rateTermDetails: [
{
title: 'Rate definition 1',
terms: ['term 1', 'term 2', 'term 3'],
},
],
},
}
export const Package: Story = {
args: {
rateTitle: 'NON-REFUNDABLE',
paymentTerm: 'PAY NOW',
bannerText: 'WDCPHG ∙ Breakfast included',
rate: {
label: 'Luxurious wine & dine in Copenhagen',
price: '1989',
unit: 'EUR/NIGHT',
},
approximateRate: {
price: '1989',
label: 'Approx.',
unit: 'EUR',
},
rateTermDetails: [
{
title: 'Rate definition 1',
terms: ['term 1', 'term 2', 'term 3'],
},
],
},
}
export const CampaignLoggedIn: Story = {
args: {
rateTitle: 'NON-REFUNDABLE',
paymentTerm: 'PAY NOW',
bannerText: 'SUM2025 ∙ Breakfast included',
rate: {
label: 'Luxurious wine & dine in Copenhagen',
price: '198',
unit: 'EUR/NIGHT',
},
approximateRate: {
price: '198',
label: 'Approx.',
unit: 'EUR',
},
comparisonRate: {
price: '249',
unit: 'EUR/NIGHT',
},
isHighlightedRate: true,
rateTermDetails: [
{
title: 'Rate definition 1',
terms: ['term 1', 'term 2', 'term 3'],
},
],
},
}
export const CampaignOmnibus: Story = {
args: {
rateTitle: 'NON-REFUNDABLE',
paymentTerm: 'PAY NOW',
bannerText: 'WDCPHG ∙ Breakfast included',
rate: {
label: 'Luxurious wine & dine in Copenhagen',
price: '198',
unit: 'EUR/NIGHT',
},
memberRate: {
label: 'Member price',
price: '150',
unit: 'EUR/NIGHT',
},
approximateRate: {
price: '198',
label: 'Approx.',
unit: 'EUR',
},
omnibusRate: {
price: '101',
label: 'Lowest past price (last 30 days)',
unit: 'EUR',
},
rateTermDetails: [
{
title: 'Rate definition 1',
terms: ['term 1', 'term 2', 'term 3'],
},
],
},
}