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,9 +1,9 @@
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import type { Meta, StoryObj } from "@storybook/nextjs-vite"
import { Badge } from './Badge.tsx'
import { Badge } from "./Badge.tsx"
const meta: Meta<typeof Badge> = {
title: 'Core Components/Badge',
title: "Core Components/Badge",
component: Badge,
}
@@ -15,7 +15,7 @@ export const Default: Story = {}
export const XS: Story = {
render: () => (
<div style={{ display: 'flex', gap: '16px', alignItems: 'center' }}>
<div style={{ display: "flex", gap: "16px", alignItems: "center" }}>
<Badge number={3} color="primary" size="20" />
<Badge number={3} color="green" size="20" />
</div>
@@ -24,7 +24,7 @@ export const XS: Story = {
export const Small: Story = {
render: () => (
<div style={{ display: 'flex', gap: '16px', alignItems: 'center' }}>
<div style={{ display: "flex", gap: "16px", alignItems: "center" }}>
<Badge number={3} color="primary" size="24" />
<Badge number={3} color="green" size="24" />
</div>
@@ -32,7 +32,7 @@ export const Small: Story = {
}
export const Medium: Story = {
render: () => (
<div style={{ display: 'flex', gap: '16px', alignItems: 'center' }}>
<div style={{ display: "flex", gap: "16px", alignItems: "center" }}>
<Badge number={3} color="primary" size="28" />
<Badge number={3} color="green" size="28" />
</div>
@@ -40,7 +40,7 @@ export const Medium: Story = {
}
export const Large: Story = {
render: () => (
<div style={{ display: 'flex', gap: '16px', alignItems: 'center' }}>
<div style={{ display: "flex", gap: "16px", alignItems: "center" }}>
<Badge number={3} color="primary" size="32" />
<Badge number={3} color="green" size="32" />
</div>
@@ -49,7 +49,7 @@ export const Large: Story = {
export const XL: Story = {
render: () => (
<div style={{ display: 'flex', gap: '16px', alignItems: 'center' }}>
<div style={{ display: "flex", gap: "16px", alignItems: "center" }}>
<Badge number={3} color="primary" size="36" />
<Badge number={3} color="green" size="36" />
</div>

View File

@@ -1,8 +1,8 @@
import { config } from './variants'
import { config } from "./variants"
import { VariantProps } from 'class-variance-authority'
import { Typography } from '../Typography'
import { TypographyProps } from '../Typography/types'
import { VariantProps } from "class-variance-authority"
import { Typography } from "../Typography"
import { TypographyProps } from "../Typography/types"
interface BadgeProps extends VariantProps<typeof config> {
number: string | number
@@ -21,15 +21,15 @@ export function Badge({ number, color, size }: BadgeProps) {
)
}
function getTypography(size: BadgeProps['size']): TypographyProps['variant'] {
function getTypography(size: BadgeProps["size"]): TypographyProps["variant"] {
switch (size) {
case '36':
case '32':
return 'Body/Paragraph/mdBold'
case '28':
case '24':
return 'Body/Supporting text (caption)/smBold'
case '20':
return 'Label/xsRegular'
case "36":
case "32":
return "Body/Paragraph/mdBold"
case "28":
case "24":
return "Body/Supporting text (caption)/smBold"
case "20":
return "Label/xsRegular"
}
}

View File

@@ -1 +1 @@
export { Badge } from './Badge'
export { Badge } from "./Badge"

View File

@@ -1,6 +1,6 @@
import { cva } from 'class-variance-authority'
import { cva } from "class-variance-authority"
import styles from './badge.module.css'
import styles from "./badge.module.css"
export const config = cva(styles.badge, {
variants: {
@@ -9,15 +9,15 @@ export const config = cva(styles.badge, {
green: styles.green,
},
size: {
'36': styles._36,
'32': styles._32,
'28': styles._28,
'24': styles._24,
'20': styles._20,
"36": styles._36,
"32": styles._32,
"28": styles._28,
"24": styles._24,
"20": styles._20,
},
},
defaultVariants: {
color: 'primary',
size: '28',
color: "primary",
size: "28",
},
})