Skip to content

Commit

Permalink
Merge pull request #8339 from guardian/ash/DocumentBlockElement
Browse files Browse the repository at this point in the history
Mark DocumentBlockElement props as optional
  • Loading branch information
AshCorr authored Jul 21, 2023
2 parents e673e44 + 9bb704b commit e234547
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export const getDocumentCloudAssetUrl = (

type Props = {
embedUrl?: string;
height: number;
height?: number;
isMainMedia: boolean;
isTracking: boolean;
role?: RoleType;
source?: string;
sourceDomain?: string;
title?: string;
width: number;
width?: number;
};

export const DocumentBlockComponent = ({
Expand Down
5 changes: 1 addition & 4 deletions dotcom-rendering/src/model/article-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1666,10 +1666,7 @@
"required": [
"_type",
"elementId",
"embedUrl",
"height",
"isThirdPartyTracking",
"width"
"isThirdPartyTracking"
]
},
"EmbedBlockElement": {
Expand Down
5 changes: 1 addition & 4 deletions dotcom-rendering/src/model/block-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1197,10 +1197,7 @@
"required": [
"_type",
"elementId",
"embedUrl",
"height",
"isThirdPartyTracking",
"width"
"isThirdPartyTracking"
]
},
"EmbedBlockElement": {
Expand Down
6 changes: 3 additions & 3 deletions dotcom-rendering/src/types/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ export interface DividerBlockElement {
export interface DocumentBlockElement extends ThirdPartyEmbeddedContent {
_type: 'model.dotcomrendering.pageElements.DocumentBlockElement';
elementId: string;
embedUrl: string;
height: number;
width: number;
embedUrl?: string;
height?: number;
width?: number;
title?: string;
role?: RoleType;
}
Expand Down

0 comments on commit e234547

Please sign in to comment.