file download component

This commit is contained in:
Julian Krauser 2025-01-18 11:30:46 +01:00
parent 2189a3d33b
commit 9d81666a3c
14 changed files with 75 additions and 20 deletions

View file

@ -4,6 +4,7 @@ import type DynamicZoneEmphasiseArticle from "./dynamicZoneEmphasiseArticle";
import type DynamicZoneFullImage from "./dynamicZoneFullImage";
import type DynamicZoneFullText from "./dynamicZoneFullText";
import type DynamicZoneGallery from "./dynamicZoneGallery";
import type DynamicZoneFileDownload from "./dynamicZoneFileDownload";
import type SharedList from "./sharedList";
export default interface BaseComponent {
@ -18,7 +19,8 @@ export type ComponentNames =
| "dynamic-zone.full-image"
| "dynamic-zone.emphasise-article"
| "dynamic-zone.dual-column-text"
| "dynamic-zone.column-image-text";
| "dynamic-zone.column-image-text"
| "dynamic-zone.file-download";
export type ComponentTypes =
| SharedList
@ -27,4 +29,5 @@ export type ComponentTypes =
| DynamicZoneFullImage
| DynamicZoneEmphasiseArticle
| DynamicZoneDualColumnText
| DynamicZoneColumnImageText;
| DynamicZoneColumnImageText
| DynamicZoneFileDownload;

View file

@ -1,4 +1,4 @@
export default interface BaseImage {
export default interface BaseFile {
id: number;
documentId: string;
name: string;

View file

@ -1,10 +1,10 @@
import type ContentField from "../field/content";
import type BaseComponent from "./baseComponent";
import type BaseImage from "./baseImage";
import type BaseFile from "./baseFile";
export default interface DynamicZoneColumnImageText extends BaseComponent {
__component: "dynamic-zone.column-image-text";
text: ContentField;
image_left: boolean;
image: BaseImage;
image: BaseFile;
}

View file

@ -0,0 +1,9 @@
import type BaseComponent from "./baseComponent";
import type BaseFile from "./baseFile";
export default interface DynamicZoneFileDownload extends BaseComponent {
__component: "dynamic-zone.file-download";
enable_download: boolean;
title: string;
file: BaseFile;
}

View file

@ -1,7 +1,7 @@
import type BaseComponent from "./baseComponent";
import type BaseImage from "./baseImage";
import type BaseFile from "./baseFile";
export default interface DynamicZoneFullImage extends BaseComponent {
__component: "dynamic-zone.full-image";
image: BaseImage;
image: BaseFile;
}

View file

@ -1,7 +1,7 @@
import type BaseComponent from "./baseComponent";
import type BaseImage from "./baseImage";
import type BaseFile from "./baseFile";
export default interface DynamicZoneGallery extends BaseComponent {
__component: "dynamic-zone.gallery";
images: Array<BaseImage>;
images: Array<BaseFile>;
}

View file

@ -1,8 +1,8 @@
import type BaseImage from "./baseImage";
import type BaseFile from "./baseFile";
import type NavbarItem from "./itemsNavbarItem";
export default interface Navbar {
id: number;
logo: BaseImage;
logo: BaseFile;
navbar_items: NavbarItem[];
}

View file

@ -1,7 +1,7 @@
import type BaseImage from "./baseImage";
import type BaseFile from "./baseFile";
export default interface SharedHero {
id: number;
title: string;
banner: BaseImage;
banner: BaseFile;
}