file download component
This commit is contained in:
parent
2189a3d33b
commit
9d81666a3c
14 changed files with 75 additions and 20 deletions
|
@ -1,4 +1,4 @@
|
|||
import type BaseImage from "../component/baseImage";
|
||||
import type BaseFile from "../component/baseFile";
|
||||
import type BaseCollection from "./baseCollection";
|
||||
|
||||
export default interface Article extends BaseCollection {}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type BaseImage from "../component/baseImage";
|
||||
import type BaseFile from "../component/baseFile";
|
||||
import type ContentField from "../field/content";
|
||||
|
||||
export default interface BaseCollection {
|
||||
|
@ -14,6 +14,6 @@ export default interface BaseCollection {
|
|||
description: string;
|
||||
date: string | undefined;
|
||||
content: ContentField | undefined;
|
||||
image: BaseImage | undefined;
|
||||
attachment: Array<BaseImage>;
|
||||
image: BaseFile | undefined;
|
||||
attachment: Array<BaseFile>;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type BaseImage from "../component/baseImage";
|
||||
import type BaseFile from "../component/baseFile";
|
||||
import type BaseCollection from "./baseCollection";
|
||||
|
||||
export default interface Vehicle extends BaseCollection {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default interface BaseImage {
|
||||
export default interface BaseFile {
|
||||
id: number;
|
||||
documentId: string;
|
||||
name: string;
|
|
@ -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;
|
||||
}
|
||||
|
|
9
types/component/dynamicZoneFileDownload.ts
Normal file
9
types/component/dynamicZoneFileDownload.ts
Normal 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;
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>;
|
||||
}
|
||||
|
|
|
@ -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[];
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type BaseImage from "../component/baseImage";
|
||||
import type BaseFile from "../component/baseFile";
|
||||
import type { ComponentTypes } from "../component/baseComponent";
|
||||
|
||||
export default interface Homepage {
|
||||
|
@ -8,7 +8,7 @@ export default interface Homepage {
|
|||
updatedAt: string;
|
||||
publishedAt: string;
|
||||
locale: string;
|
||||
backdrop: BaseImage;
|
||||
backdrop: BaseFile;
|
||||
hide_backdrop: boolean;
|
||||
content: Array<ComponentTypes>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue