content text and dynamic zone components
This commit is contained in:
parent
44b55d9bbb
commit
3df3ba4ebc
22 changed files with 202 additions and 24 deletions
24
types/field/content.ts
Normal file
24
types/field/content.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
export default interface ContentField
|
||||
extends Array<
|
||||
| {
|
||||
type: "paragraph" | "heading" | "quote";
|
||||
children: Array<TypeField>;
|
||||
level?: number;
|
||||
}
|
||||
| {
|
||||
type: "list";
|
||||
format: "unordered" | "ordered";
|
||||
children: Array<{ type: "list-item"; children: Array<TypeField> }>;
|
||||
}
|
||||
> {}
|
||||
|
||||
export type TypeField = TextField | { type: "link"; url: string; children: Array<TextField> };
|
||||
|
||||
export type TextField = {
|
||||
type: "text";
|
||||
text: string;
|
||||
strikethrough?: boolean;
|
||||
underline?: boolean;
|
||||
italic?: boolean;
|
||||
bold?: boolean;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue