25 lines
588 B
TypeScript
25 lines
588 B
TypeScript
|
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;
|
||
|
};
|