tibi-starter/types/content.d.ts

29 lines
654 B
TypeScript
Raw Permalink Normal View History

2024-02-13 17:36:09 +01:00
interface Content {
2024-01-27 19:58:35 +01:00
path: string
active: boolean
2024-02-13 17:36:09 +01:00
type: "page"
2024-01-27 19:58:35 +01:00
pageTitle: string
rows: Row[]
id: string
meta: {
title: string
description: string
keywords: string
}
}
interface Row {
2024-02-13 17:36:09 +01:00
title: string
backgroundImage: string
2024-01-27 19:58:35 +01:00
columns: Column[]
}
type Column =
2024-02-13 17:36:09 +01:00
| { contentType: "images"; images: string[] }
2024-01-27 19:58:35 +01:00
| { contentType: "moduleImport"; moduleImport: string }
2024-02-13 17:36:09 +01:00
| { contentType: "form"; moduleImport: string }
2024-01-27 19:58:35 +01:00
| { contentType: "text"; text: string }
2024-02-13 17:36:09 +01:00
| { contentType: "googleMaps" }
type Module = { type: "form"; form: DBFormObj; id: string } | { type: ""; id: string }