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,12 +1,12 @@
|
||||
import { cx } from 'class-variance-authority'
|
||||
import { Label, Radio } from 'react-aria-components'
|
||||
import { cx } from "class-variance-authority"
|
||||
import { Label, Radio } from "react-aria-components"
|
||||
|
||||
import styles from './paymentOption.module.css'
|
||||
import styles from "./paymentOption.module.css"
|
||||
|
||||
import type { PaymentMethodEnum } from '@scandic-hotels/common/constants/paymentMethod'
|
||||
import type { PaymentMethodEnum } from "@scandic-hotels/common/constants/paymentMethod"
|
||||
|
||||
import { PaymentMethodIcon } from '../../Payment/PaymentMethodIcon'
|
||||
import { Typography } from '../../Typography'
|
||||
import { PaymentMethodIcon } from "../../Payment/PaymentMethodIcon"
|
||||
import { Typography } from "../../Typography"
|
||||
|
||||
export type PaymentOptionProps = {
|
||||
value: string
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
|
||||
import { expect, fn } from 'storybook/test'
|
||||
import type { Meta, StoryObj } from "@storybook/nextjs-vite"
|
||||
import { expect, fn } from "storybook/test"
|
||||
|
||||
import { PaymentOptionsGroup } from './PaymentOptionsGroup'
|
||||
import { PaymentOption } from './PaymentOption'
|
||||
import { PaymentMethodEnum } from '@scandic-hotels/common/constants/paymentMethod'
|
||||
import { FormDecorator } from '../../../../.storybook/decorators/FormDecorator'
|
||||
import { PaymentOptionsGroup } from "./PaymentOptionsGroup"
|
||||
import { PaymentOption } from "./PaymentOption"
|
||||
import { PaymentMethodEnum } from "@scandic-hotels/common/constants/paymentMethod"
|
||||
import { FormDecorator } from "../../../../.storybook/decorators/FormDecorator"
|
||||
|
||||
const meta: Meta<typeof PaymentOptionsGroup> = {
|
||||
title: 'Patterns/Form/Payment/PaymentOptionsGroup',
|
||||
title: "Patterns/Form/Payment/PaymentOptionsGroup",
|
||||
component: PaymentOptionsGroup,
|
||||
decorators: [FormDecorator],
|
||||
}
|
||||
@@ -17,8 +17,8 @@ type Story = StoryObj<typeof PaymentOptionsGroup>
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
label: 'Select Payment Method',
|
||||
name: 'paymentMethod',
|
||||
label: "Select Payment Method",
|
||||
name: "paymentMethod",
|
||||
onChange: fn(),
|
||||
children: (
|
||||
<>
|
||||
@@ -42,11 +42,11 @@ export const Default: Story = {
|
||||
),
|
||||
},
|
||||
play: async ({ canvas, userEvent, args }) => {
|
||||
const visaOption = await canvas.findByRole('radio', { name: 'Visa' })
|
||||
const visaOption = await canvas.findByRole("radio", { name: "Visa" })
|
||||
expect(visaOption).toBeInTheDocument()
|
||||
|
||||
expect(args.onChange).not.toHaveBeenCalled()
|
||||
await userEvent.click(visaOption)
|
||||
expect(args.onChange).toHaveBeenCalledWith('visa')
|
||||
expect(args.onChange).toHaveBeenCalledWith("visa")
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
'use client'
|
||||
"use client"
|
||||
|
||||
import { Label, RadioGroup } from 'react-aria-components'
|
||||
import { useController, useFormContext } from 'react-hook-form'
|
||||
import type { ReactNode } from 'react'
|
||||
import { Typography } from '../../../components/Typography'
|
||||
import { Label, RadioGroup } from "react-aria-components"
|
||||
import { useController, useFormContext } from "react-hook-form"
|
||||
import type { ReactNode } from "react"
|
||||
import { Typography } from "../../../components/Typography"
|
||||
|
||||
interface PaymentOptionsGroupProps {
|
||||
name: string
|
||||
|
||||
Reference in New Issue
Block a user