Skip to content

Commit

Permalink
Add Effects to MediaBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Haliax committed Sep 10, 2023
1 parent 884391f commit 2794db5
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/blocks/MediaBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,29 @@ export const MediaBlock: Block = {
layout: 'horizontal',
},
},
{
name: 'effects',
label: 'Effekte',
type: 'select',
options: [
{
label: 'Blur',
value: 'blur',
},
{
label: 'Grayscale',
value: 'grayscale',
},
{
label: 'Desaturated',
value: 'desaturated',
},
{
label: 'Darker',
value: 'darker',
},
],
},
{
name: 'caption',
label: 'Anmerkung',
Expand Down
23 changes: 23 additions & 0 deletions src/blocks/MediaContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,29 @@ export const MediaContent: Block = {
description: 'ToDo: Beschreibung einfügen.',
},
},
{
name: 'effects',
label: 'Effekte',
type: 'select',
options: [
{
label: 'Blur',
value: 'blur',
},
{
label: 'Grayscale',
value: 'grayscale',
},
{
label: 'Desaturated',
value: 'desaturated',
},
{
label: 'Darker',
value: 'darker',
},
],
},

richText(
{
Expand Down
6 changes: 6 additions & 0 deletions src/payload-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export interface Organisation {
| {
media: string | Media;
size?: 'normal' | 'wide' | 'event';
effects?: 'blur' | 'grayscale' | 'desaturated' | 'darker';
caption?: string;
id?: string;
blockName?: string;
Expand All @@ -148,6 +149,7 @@ export interface Organisation {
backgroundColor: 'white' | 'black';
headline?: string;
media: string | Media;
effects?: 'blur' | 'grayscale' | 'desaturated' | 'darker';
richText: {
[k: string]: unknown;
}[];
Expand Down Expand Up @@ -245,6 +247,7 @@ export interface Circle {
| {
media: string | Media;
size?: 'normal' | 'wide' | 'event';
effects?: 'blur' | 'grayscale' | 'desaturated' | 'darker';
caption?: string;
id?: string;
blockName?: string;
Expand All @@ -255,6 +258,7 @@ export interface Circle {
backgroundColor: 'white' | 'black';
headline?: string;
media: string | Media;
effects?: 'blur' | 'grayscale' | 'desaturated' | 'darker';
richText: {
[k: string]: unknown;
}[];
Expand Down Expand Up @@ -352,6 +356,7 @@ export interface Page {
| {
media: string | Media;
size?: 'normal' | 'wide' | 'event';
effects?: 'blur' | 'grayscale' | 'desaturated' | 'darker';
caption?: string;
id?: string;
blockName?: string;
Expand All @@ -362,6 +367,7 @@ export interface Page {
backgroundColor: 'white' | 'black';
headline?: string;
media: string | Media;
effects?: 'blur' | 'grayscale' | 'desaturated' | 'darker';
richText: {
[k: string]: unknown;
}[];
Expand Down

0 comments on commit 2794db5

Please sign in to comment.