Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types for header changes #40

Merged
merged 2 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions types/schema/components/component-card.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { File } from '../system/file.js';
import type { Page } from '../content/page/page.js';
import type { Resource } from '../content/resource.js';

export interface ComponentCard {
id: string;
sort: number | null;
title: string | null;
description: string | null;
image: File | null;
type: string | null;
page: string | Page | null;
resource: string | Resource | null;
external_url: string | null;
}
17 changes: 15 additions & 2 deletions types/schema/components/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,20 @@ import type { ComponentHeading } from './component-heading';
import type { ComponentMedia } from './component-media';
import type { ComponentMetrics } from './component-metrics';
import type { ComponentQuote } from './component-quote';
import type { ComponentCard } from './component-card';

export type ComponentType = 'comp_button_group' | 'comp_heading' | 'comp_media' | 'comp_metrics' | 'comp_quote';
export type ComponentType =
| 'comp_button_group'
| 'comp_heading'
| 'comp_media'
| 'comp_metrics'
| 'comp_quote'
| 'comp_cards';

export type Component = ComponentButtonGroup | ComponentHeading | ComponentMedia | ComponentMetrics | ComponentQuote;
export type Component =
| ComponentButtonGroup
| ComponentHeading
| ComponentMedia
| ComponentMetrics
| ComponentQuote
| ComponentCard;
1 change: 1 addition & 0 deletions types/schema/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export type * from './component-button-group.js';
export type * from './component-button.js';
export type * from './component-card.js';
export type * from './component-heading.js';
export type * from './component-media.js';
export type * from './component-metrics.js';
Expand Down
2 changes: 2 additions & 0 deletions types/schema/meta/globals.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { User } from '../system/index.js';
import type { ComponentButtonGroup } from '../components/component-button-group.js';

export interface Globals {
id: string;
Expand All @@ -14,4 +15,5 @@ export interface Globals {
social: string;
sales: string;
seo: string;
header_cta_buttons: ComponentButtonGroup;
}
Loading