Merged in fix/SW-3484-campaign-remove-breakfast-message-chip (pull request #2820)

fix(SW-3484): remove breakfast message in the booking code chip for campaign

* fix(SW-3484): remove breakfast message in the booking code chip for campaign


Approved-by: Matilda Landström
This commit is contained in:
Bianca Widstam
2025-09-17 08:11:10 +00:00
parent 886f1b2f11
commit 1e566e59f7
5 changed files with 9 additions and 45 deletions

View File

@@ -45,32 +45,14 @@ export const WithCloseButton: Story = {
),
}
export const CampaignBreakfastIncluded: Story = {
export const CampaignWithoutBookingCode: Story = {
args: {},
render: () => (
<BookingCodeChip isCampaign bookingCode="SUMMER25" isBreakfastIncluded />
),
}
export const CampaignBreakfastExcluded: Story = {
args: {},
render: () => (
<BookingCodeChip
isCampaign
bookingCode="SUMMER25"
isBreakfastIncluded={false}
/>
),
render: () => <BookingCodeChip isCampaign />,
}
export const CampaignFilledIcon: Story = {
args: {},
render: () => (
<BookingCodeChip
isCampaign
bookingCode="SUMMER25"
isBreakfastIncluded
filledIcon
/>
<BookingCodeChip isCampaign bookingCode="SUMMER25" filledIcon />
),
}

View File

@@ -12,7 +12,6 @@ import styles from './bookingCodeChip.module.css'
type BaseBookingCodeChipProps = {
alignCenter?: boolean
bookingCode?: string | null
isBreakfastIncluded?: boolean
isCampaign?: boolean
isUnavailable?: boolean
withText?: boolean
@@ -33,7 +32,6 @@ type BookingCodeChipProps =
export function BookingCodeChip({
alignCenter,
bookingCode,
isBreakfastIncluded,
isCampaign,
isUnavailable,
withText = true,
@@ -61,19 +59,11 @@ export function BookingCodeChip({
{intl.formatMessage({ defaultMessage: 'Campaign' })}
</strong>
</Typography>
<Typography variant="Body/Supporting text (caption)/smRegular">
<span>
{isBreakfastIncluded
? // eslint-disable-next-line formatjs/no-literal-string-in-jsx
`${bookingCode ?? ''} ${intl.formatMessage({
defaultMessage: 'Breakfast included',
})}`
: // eslint-disable-next-line formatjs/no-literal-string-in-jsx
`${bookingCode ?? ''} ${intl.formatMessage({
defaultMessage: 'Breakfast excluded',
})}`}
</span>
</Typography>
{bookingCode && (
<Typography variant="Body/Supporting text (caption)/smRegular">
<span>{bookingCode}</span>
</Typography>
)}
</p>
</IconChip>
)