fix: unite all price details modals to one and align on ui

This commit is contained in:
Simon Emanuelsson
2025-04-15 15:04:11 +02:00
committed by Michael Zetterberg
parent 8152aea649
commit 1f94c581ae
54 changed files with 1926 additions and 746 deletions

View File

@@ -0,0 +1,6 @@
import { type TbodyProps,tbodyVariants } from "./variants"
export default function Tbody({ border, children }: TbodyProps) {
const classNames = tbodyVariants({ border })
return <tbody className={classNames}>{children}</tbody>
}

View File

@@ -0,0 +1,23 @@
.tbody {
display: flex;
gap: var(--Spacing-x-half);
flex-direction: column;
width: 100%;
}
.tbody:has(tr > th) {
padding-top: var(--Spacing-x2);
}
.tbody:has(tr > th):not(:first-of-type),
.border {
border-top: 1px solid var(--Primary-Light-On-Surface-Divider-subtle);
}
.tbody:not(:last-child) {
padding-bottom: var(--Spacing-x2);
}
.border {
padding-top: var(--Spacing-x2);
}

View File

@@ -0,0 +1,18 @@
import { cva, type VariantProps } from "class-variance-authority"
import styles from "./tbody.module.css"
import type { PropsWithChildren } from "react"
export const tbodyVariants = cva(styles.tbody, {
variants: {
border: {
true: styles.border,
},
},
defaultVariants: {},
})
export interface TbodyProps
extends PropsWithChildren,
VariantProps<typeof tbodyVariants> {}