Skip to content

Commit d656a82

Browse files
committed
feat: add table field model
1 parent 3e20131 commit d656a82

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/types/model/table.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type { CustomTypeModelFieldType } from "./types"
2+
3+
/**
4+
* A table custom type field.
5+
*
6+
* More details: {@link https://prismic.io/docs/table}
7+
*/
8+
export interface CustomTypeModelTableField {
9+
type: typeof CustomTypeModelFieldType.Table
10+
config?: {
11+
label?: string | null
12+
}
13+
}

src/types/model/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import type { CustomTypeModelRichTextField } from "./richText"
1919
import type { CustomTypeModelSelectField } from "./select"
2020
import type { CustomTypeModelSeparatorField } from "./separator"
2121
import type { CustomTypeModelSliceZoneField } from "./sliceZone"
22+
import type { CustomTypeModelTableField } from "./table"
2223
import type { CustomTypeModelTimestampField } from "./timestamp"
2324
import type { CustomTypeModelTitleField } from "./title"
2425
import type { CustomTypeModelUIDField } from "./uid"
@@ -40,6 +41,7 @@ export const CustomTypeModelFieldType = {
4041
Select: "Select",
4142
Slices: "Slices",
4243
StructuredText: "StructuredText",
44+
Table: "Table",
4345
Text: "Text",
4446
Timestamp: "Timestamp",
4547
UID: "UID",
@@ -102,6 +104,7 @@ export type CustomTypeModelFieldForNestedGroup =
102104
| CustomTypeModelRangeField
103105
| CustomTypeModelSelectField
104106
| CustomTypeModelRichTextField
107+
| CustomTypeModelTableField
105108
| CustomTypeModelTitleField
106109
| CustomTypeModelKeyTextField
107110
| CustomTypeModelTimestampField

0 commit comments

Comments
 (0)