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:
Rasmus Langvad
2026-01-07 12:45:50 +00:00
parent 932413412b
commit d0546926a9
500 changed files with 18367 additions and 18419 deletions

View File

@@ -1,27 +1,27 @@
import { Toast } from './Toast'
import { Toast } from "./Toast"
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import { expect } from 'storybook/test'
import type { Meta, StoryObj } from "@storybook/nextjs-vite"
import { expect } from "storybook/test"
import { config } from './variants.ts'
import { config } from "./variants.ts"
const meta: Meta<typeof Toast> = {
title: 'Core Components/Toast/Toast',
title: "Core Components/Toast/Toast",
component: Toast,
argTypes: {
variant: {
control: 'select',
type: 'string',
control: "select",
type: "string",
options: Object.keys(config.variants.variant),
table: {
defaultValue: { summary: 'info' },
defaultValue: { summary: "info" },
},
},
message: {
control: 'text',
type: 'string',
control: "text",
type: "string",
table: {
defaultValue: { summary: 'Toast message' },
defaultValue: { summary: "Toast message" },
},
},
},
@@ -33,36 +33,36 @@ type Story = StoryObj<typeof Toast>
export const Default: Story = {
args: {
variant: 'info',
message: 'This is a toast',
variant: "info",
message: "This is a toast",
},
play: async ({ canvas }) => {
const toast = await canvas.findByRole('status')
const toast = await canvas.findByRole("status")
expect(toast).toBeVisible()
},
}
export const DefaultWithCustomContent: Story = {
args: {
variant: 'info',
variant: "info",
children: (
<p style={{ fontStyle: 'italic' }}>This is a custom info toast</p>
<p style={{ fontStyle: "italic" }}>This is a custom info toast</p>
),
},
play: async ({ canvas }) => {
const toast = await canvas.findByRole('status')
const toast = await canvas.findByRole("status")
expect(toast).toBeVisible()
expect(canvas.getByText('This is a custom info toast')).toBeVisible()
expect(canvas.getByText("This is a custom info toast")).toBeVisible()
},
}
export const Success: Story = {
args: {
variant: 'success',
message: 'This is a success toast',
variant: "success",
message: "This is a success toast",
},
play: async ({ canvas, args }) => {
const toast = await canvas.findByRole('status')
const toast = await canvas.findByRole("status")
expect(toast).toBeVisible()
expect(canvas.getByText(args.message as string)).toBeVisible()
},
@@ -70,11 +70,11 @@ export const Success: Story = {
export const Error: Story = {
args: {
variant: 'error',
message: 'This is an error toast',
variant: "error",
message: "This is an error toast",
},
play: async ({ canvas, args }) => {
const toast = await canvas.findByRole('alert')
const toast = await canvas.findByRole("alert")
expect(toast).toBeVisible()
expect(canvas.getByText(args.message as string)).toBeVisible()
},
@@ -82,11 +82,11 @@ export const Error: Story = {
export const Warning: Story = {
args: {
variant: 'warning',
message: 'This is a warning toast',
variant: "warning",
message: "This is a warning toast",
},
play: async ({ canvas, args }) => {
const toast = await canvas.findByRole('alert')
const toast = await canvas.findByRole("alert")
expect(toast).toBeVisible()
expect(canvas.getByText(args.message as string)).toBeVisible()
},