change: split file into viewer and download

This commit is contained in:
Julian Krauser 2025-02-19 13:35:38 +01:00
parent 5d3cce3b8b
commit a7ea081784
6 changed files with 56 additions and 21 deletions

View file

@ -9,6 +9,7 @@ import type DynamicZoneFileDownload from "./dynamic-zone/fileDownload";
import type DynamicZoneEmbedding from "./dynamic-zone/embedding";
import type DynamicZoneSection from "./dynamic-zone/section";
import type DynamicZoneSpacer from "./dynamic-zone/spacer";
import type DynamicZoneFileViewer from "./dynamic-zone/fileViewer";
export default interface BaseComponent {
__component: ComponentNames;
@ -25,6 +26,7 @@ export type ComponentNames =
| "dynamic-zone.full-image"
| "dynamic-zone.dual-column-text"
| "dynamic-zone.column-image-text"
| "dynamic-zone.file-viewer"
| "dynamic-zone.file-download"
| "dynamic-zone.embedding";
@ -38,5 +40,6 @@ export type ComponentTypes =
| DynamicZoneFullImage
| DynamicZoneDualColumnText
| DynamicZoneColumnImageText
| DynamicZoneFileViewer
| DynamicZoneFileDownload
| DynamicZoneEmbedding;

View file

@ -3,6 +3,5 @@ import type BaseFile from "../baseFile";
export default interface DynamicZoneFileDownload extends BaseComponent {
__component: "dynamic-zone.file-download";
enable_download: boolean;
file: BaseFile;
}

View file

@ -0,0 +1,7 @@
import type BaseComponent from "../baseComponent";
import type BaseFile from "../baseFile";
export default interface DynamicZoneFileViewer extends BaseComponent {
__component: "dynamic-zone.file-viewer";
file: BaseFile;
}