feat: news
This commit is contained in:
+3
-8
@@ -1,4 +1,4 @@
|
||||
export const PAGE_TYPES = ["NEWS"] as const;
|
||||
export const PAGE_TYPES = ["NEWS", "PAGE"] as const;
|
||||
export type PageType = typeof PAGE_TYPES[number];
|
||||
|
||||
export const PAGE_STATUSES = ["DRAFT", "PUBLISHED", "ARCHIVED"] as const;
|
||||
@@ -22,20 +22,15 @@ export type Page = {
|
||||
createdBy: string;
|
||||
}
|
||||
|
||||
export const BLOCK_TYPES = ["PARAGRAPH", "HEADING", "IMAGE", "FILE", "QUOTE", "DIVIDER", "TABLE", "CALLOUT", "LIST", "LINK"] as const;
|
||||
export const BLOCK_TYPES = ["PARAGRAPH", "HEADING", "QUOTE", "DIVIDER", "CALLOUT"] as const;
|
||||
export type BlockType = typeof BLOCK_TYPES[number];
|
||||
|
||||
export type BlockContent =
|
||||
| { type: "PARAGRAPH"; text: string }
|
||||
| { type: "HEADING"; text: string; level: 1 | 2 | 3 }
|
||||
| { type: "IMAGE"; url: string; caption?: string }
|
||||
| { type: "FILE"; url: string; name: string }
|
||||
| { type: "QUOTE"; text: string; author?: string }
|
||||
| { type: "DIVIDER" }
|
||||
| { type: "TABLE"; headers: string[]; rows: string[][] }
|
||||
| { type: "CALLOUT"; text: string; icon?: string; color?: string }
|
||||
| { type: "LIST"; style: "BULLET" | "NUMBERED"; items: string[] }
|
||||
| { type: "LINK"; text?: string; url: string };
|
||||
| { type: "CALLOUT"; title: string; text: string }
|
||||
|
||||
export type Block = {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user