Merged in feat/sw-2874-move-select-rate (pull request #2750)

Approved-by: Joakim Jäderberg
This commit is contained in:
Anton Gunnarsson
2025-09-03 08:30:05 +00:00
parent 8c3f8c74db
commit f7ef58eafa
158 changed files with 708 additions and 735 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> {}