From 9091c602b158af7cf13d2d7859a874b79775c439 Mon Sep 17 00:00:00 2001 From: Petter Andersson Date: Mon, 11 Mar 2024 12:49:45 +0100 Subject: [PATCH] add more options for content --- src/content/content.gql.schema.ts | 6 ++++++ src/content/content.spec.ts | 3 +++ src/content/mappers.ts | 3 +++ src/content/types.ts | 3 +++ 4 files changed, 15 insertions(+) diff --git a/src/content/content.gql.schema.ts b/src/content/content.gql.schema.ts index c56b3ff..96e5d9c 100644 --- a/src/content/content.gql.schema.ts +++ b/src/content/content.gql.schema.ts @@ -21,7 +21,10 @@ export const contentGqlSchema = /* GraphQL */ ` input ContentModuleInput { title: String body: String + border: String image: String + position: String + width: String imageRef: String categories: String tags: String @@ -42,7 +45,10 @@ export const contentGqlSchema = /* GraphQL */ ` type ContentModule { title: String body: String + border: String image: String + position: String + width: String imageRef: String categories: String tags: String diff --git a/src/content/content.spec.ts b/src/content/content.spec.ts index 75bf0a4..a0c0d3e 100644 --- a/src/content/content.spec.ts +++ b/src/content/content.spec.ts @@ -29,7 +29,10 @@ it('should normalize invalid composition', () => { module: { title: '', body: '', + border: 'true', image: '', + width: '100%', + position: 'top', imageRef: '', categories: '', tags: '', diff --git a/src/content/mappers.ts b/src/content/mappers.ts index d603016..48a0ba7 100644 --- a/src/content/mappers.ts +++ b/src/content/mappers.ts @@ -3,7 +3,10 @@ import type { ContentModule, ViewComposition } from './types' export const createEmptyModule = (): ContentModule => ({ title: '', body: '', + border: 'true', image: '', + position: 'top', + width: '100%', categories: '', tags: '', imageRef: '', diff --git a/src/content/types.ts b/src/content/types.ts index f0e4e01..fa995c1 100644 --- a/src/content/types.ts +++ b/src/content/types.ts @@ -14,7 +14,10 @@ export interface ViewColumn { export type ContentModule = { title: string body: string + border: 'true' | 'false' image: string + position: 'top' | 'bottom' | 'left' | 'right' + width: string imageRef: string categories: string tags: string