Files
web/apps/scandic-web/components/TempDesignSystem/Grids/Dynamic/dynamic.ts
Anton Gunnarsson 08804e8675 Merged in chore/cleanup-scandic-web (pull request #2831)
chore: Cleanup scandic-web

* Remove unused files

* Remove unused and add missing packages

* Remove unused exports


Approved-by: Linus Flood
2025-09-18 15:33:00 +00:00

32 lines
709 B
TypeScript

import type { Edges } from "@scandic-hotels/trpc/types/edges"
import type { TypenameInterface } from "@/types/requests/utils/typename"
export type Order = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
type ColSpan = 2 | 3 | 4 | 6 | 8
export type RowSpan = 1 | 2 | 3 | 6
// TODO: Extend query and fix type accordingly
interface Row extends TypenameInterface<"Card"> {
title: string
}
type Column = {
span: ColSpan
rows: {
rowConnection: Edges<Row>
}[]
}
interface Grid {
columns: Column[]
}
export interface GridProps
extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
children: (row: Row) => React.ReactNode
items: Grid
tag?: "aside" | "article" | "div" | "main" | "section"
}