Merged in fix/3697-prettier-configs (pull request #3396)
fix(SW-3691): Setup one prettier config for whole repo * Setup prettierrc in root and remove other configs Approved-by: Joakim Jäderberg Approved-by: Linus Flood
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
|
||||
import CampaignRateCard from '.'
|
||||
import type { Meta, StoryObj } from "@storybook/nextjs-vite"
|
||||
import CampaignRateCard from "."
|
||||
|
||||
const meta: Meta<typeof CampaignRateCard> = {
|
||||
title: 'Product Components/RateCard/Campaign',
|
||||
title: "Product Components/RateCard/Campaign",
|
||||
component: CampaignRateCard,
|
||||
decorators: [
|
||||
(Story) => (
|
||||
<div style={{ maxWidth: '400px' }}>
|
||||
<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' },
|
||||
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" },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -30,28 +30,28 @@ type Story = StoryObj<typeof CampaignRateCard>
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
rateTitle: 'NON-REFUNDABLE',
|
||||
paymentTerm: 'PAY NOW',
|
||||
bannerText: 'Campaign ∙ Breakfast included',
|
||||
rateTitle: "NON-REFUNDABLE",
|
||||
paymentTerm: "PAY NOW",
|
||||
bannerText: "Campaign ∙ Breakfast included",
|
||||
rate: {
|
||||
label: "Valentine's Special",
|
||||
price: '198',
|
||||
unit: 'EUR/NIGHT',
|
||||
price: "198",
|
||||
unit: "EUR/NIGHT",
|
||||
},
|
||||
approximateRate: {
|
||||
price: '198',
|
||||
label: 'Approx.',
|
||||
unit: 'EUR',
|
||||
price: "198",
|
||||
label: "Approx.",
|
||||
unit: "EUR",
|
||||
},
|
||||
omnibusRate: {
|
||||
price: '249',
|
||||
label: 'Lowest past price (last 30 days)',
|
||||
unit: 'EUR',
|
||||
price: "249",
|
||||
label: "Lowest past price (last 30 days)",
|
||||
unit: "EUR",
|
||||
},
|
||||
rateTermDetails: [
|
||||
{
|
||||
title: 'Rate definition 1',
|
||||
terms: ['term 1', 'term 2', 'term 3'],
|
||||
title: "Rate definition 1",
|
||||
terms: ["term 1", "term 2", "term 3"],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -59,23 +59,23 @@ export const Default: Story = {
|
||||
|
||||
export const Package: Story = {
|
||||
args: {
|
||||
rateTitle: 'NON-REFUNDABLE',
|
||||
paymentTerm: 'PAY NOW',
|
||||
bannerText: 'WDCPHG ∙ Breakfast included',
|
||||
rateTitle: "NON-REFUNDABLE",
|
||||
paymentTerm: "PAY NOW",
|
||||
bannerText: "WDCPHG ∙ Breakfast included",
|
||||
rate: {
|
||||
label: 'Luxurious wine & dine in Copenhagen',
|
||||
price: '1989',
|
||||
unit: 'EUR/NIGHT',
|
||||
label: "Luxurious wine & dine in Copenhagen",
|
||||
price: "1989",
|
||||
unit: "EUR/NIGHT",
|
||||
},
|
||||
approximateRate: {
|
||||
price: '1989',
|
||||
label: 'Approx.',
|
||||
unit: 'EUR',
|
||||
price: "1989",
|
||||
label: "Approx.",
|
||||
unit: "EUR",
|
||||
},
|
||||
rateTermDetails: [
|
||||
{
|
||||
title: 'Rate definition 1',
|
||||
terms: ['term 1', 'term 2', 'term 3'],
|
||||
title: "Rate definition 1",
|
||||
terms: ["term 1", "term 2", "term 3"],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -83,28 +83,28 @@ export const Package: Story = {
|
||||
|
||||
export const CampaignLoggedIn: Story = {
|
||||
args: {
|
||||
rateTitle: 'NON-REFUNDABLE',
|
||||
paymentTerm: 'PAY NOW',
|
||||
bannerText: 'SUM2025 ∙ Breakfast included',
|
||||
rateTitle: "NON-REFUNDABLE",
|
||||
paymentTerm: "PAY NOW",
|
||||
bannerText: "SUM2025 ∙ Breakfast included",
|
||||
rate: {
|
||||
label: 'Luxurious wine & dine in Copenhagen',
|
||||
price: '198',
|
||||
unit: 'EUR/NIGHT',
|
||||
label: "Luxurious wine & dine in Copenhagen",
|
||||
price: "198",
|
||||
unit: "EUR/NIGHT",
|
||||
},
|
||||
approximateRate: {
|
||||
price: '198',
|
||||
label: 'Approx.',
|
||||
unit: 'EUR',
|
||||
price: "198",
|
||||
label: "Approx.",
|
||||
unit: "EUR",
|
||||
},
|
||||
comparisonRate: {
|
||||
price: '249',
|
||||
unit: 'EUR/NIGHT',
|
||||
price: "249",
|
||||
unit: "EUR/NIGHT",
|
||||
},
|
||||
isHighlightedRate: true,
|
||||
rateTermDetails: [
|
||||
{
|
||||
title: 'Rate definition 1',
|
||||
terms: ['term 1', 'term 2', 'term 3'],
|
||||
title: "Rate definition 1",
|
||||
terms: ["term 1", "term 2", "term 3"],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -112,33 +112,33 @@ export const CampaignLoggedIn: Story = {
|
||||
|
||||
export const CampaignOmnibus: Story = {
|
||||
args: {
|
||||
rateTitle: 'NON-REFUNDABLE',
|
||||
paymentTerm: 'PAY NOW',
|
||||
bannerText: 'WDCPHG ∙ Breakfast included',
|
||||
rateTitle: "NON-REFUNDABLE",
|
||||
paymentTerm: "PAY NOW",
|
||||
bannerText: "WDCPHG ∙ Breakfast included",
|
||||
rate: {
|
||||
label: 'Luxurious wine & dine in Copenhagen',
|
||||
price: '198',
|
||||
unit: 'EUR/NIGHT',
|
||||
label: "Luxurious wine & dine in Copenhagen",
|
||||
price: "198",
|
||||
unit: "EUR/NIGHT",
|
||||
},
|
||||
memberRate: {
|
||||
label: 'Member price',
|
||||
price: '150',
|
||||
unit: 'EUR/NIGHT',
|
||||
label: "Member price",
|
||||
price: "150",
|
||||
unit: "EUR/NIGHT",
|
||||
},
|
||||
approximateRate: {
|
||||
price: '198',
|
||||
label: 'Approx.',
|
||||
unit: 'EUR',
|
||||
price: "198",
|
||||
label: "Approx.",
|
||||
unit: "EUR",
|
||||
},
|
||||
omnibusRate: {
|
||||
price: '101',
|
||||
label: 'Lowest past price (last 30 days)',
|
||||
unit: 'EUR',
|
||||
price: "101",
|
||||
label: "Lowest past price (last 30 days)",
|
||||
unit: "EUR",
|
||||
},
|
||||
rateTermDetails: [
|
||||
{
|
||||
title: 'Rate definition 1',
|
||||
terms: ['term 1', 'term 2', 'term 3'],
|
||||
title: "Rate definition 1",
|
||||
terms: ["term 1", "term 2", "term 3"],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { cx } from 'class-variance-authority'
|
||||
import { cx } from "class-variance-authority"
|
||||
|
||||
import { Typography } from '../../Typography'
|
||||
import { Rate, RateTermDetails } from '../types'
|
||||
import { Typography } from "../../Typography"
|
||||
import { Rate, RateTermDetails } from "../types"
|
||||
|
||||
import { Button as ButtonRAC } from 'react-aria-components'
|
||||
import { useIntl } from 'react-intl'
|
||||
import { IconButton } from '../../IconButton'
|
||||
import { MaterialIcon } from '../../Icons/MaterialIcon'
|
||||
import Modal from '../Modal'
|
||||
import styles from '../rate-card.module.css'
|
||||
import { variants } from '../variants'
|
||||
import { Button as ButtonRAC } from "react-aria-components"
|
||||
import { useIntl } from "react-intl"
|
||||
import { IconButton } from "../../IconButton"
|
||||
import { MaterialIcon } from "../../Icons/MaterialIcon"
|
||||
import Modal from "../Modal"
|
||||
import styles from "../rate-card.module.css"
|
||||
import { variants } from "../variants"
|
||||
|
||||
interface CampaignRateCardProps {
|
||||
id: string
|
||||
@@ -20,7 +20,7 @@ interface CampaignRateCardProps {
|
||||
rate: Rate
|
||||
memberRate?: Rate
|
||||
omnibusRate?: Rate
|
||||
comparisonRate?: Omit<Rate, 'label'>
|
||||
comparisonRate?: Omit<Rate, "label">
|
||||
isHighlightedRate?: boolean
|
||||
isHighlightedRateLabel?: boolean
|
||||
approximateRate?: Rate
|
||||
@@ -48,7 +48,7 @@ export default function CampaignRateCard({
|
||||
rateTermDetails,
|
||||
}: CampaignRateCardProps) {
|
||||
const classNames = variants({
|
||||
variant: 'Campaign',
|
||||
variant: "Campaign",
|
||||
})
|
||||
|
||||
const intl = useIntl()
|
||||
@@ -84,8 +84,8 @@ export default function CampaignRateCard({
|
||||
size="sm"
|
||||
className={styles.triggerButton}
|
||||
aria-label={intl.formatMessage({
|
||||
id: 'selectRate.rateCard.openReservationPolicy',
|
||||
defaultMessage: 'Open reservation policy',
|
||||
id: "selectRate.rateCard.openReservationPolicy",
|
||||
defaultMessage: "Open reservation policy",
|
||||
})}
|
||||
iconName="info"
|
||||
/>
|
||||
@@ -167,7 +167,7 @@ export default function CampaignRateCard({
|
||||
<span className={styles.strikethrough}>
|
||||
{comparisonRate.price}
|
||||
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
|
||||
</span>{' '}
|
||||
</span>{" "}
|
||||
<Typography variant="Body/Supporting text (caption)/smBold">
|
||||
<span className={styles.strikethrough}>
|
||||
{comparisonRate.unit}
|
||||
|
||||
Reference in New Issue
Block a user