-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix padding of DamVideoBlock and YouTubeVideoBlock (#1335)
Fixes the padding behavior of DamVideoBlock and YouTubeVideoBlock when used inside `AdminComponentPaper`. A generic VideoBlock is added to Demo for testing purposes.
- Loading branch information
Showing
8 changed files
with
239 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@comet/blocks-admin": patch | ||
--- | ||
|
||
Fix padding behavior of `YoutubeVideoBlock` and `DamVideoBlock` when used inside `AdminComponentPaper` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { BlockCategory, createOneOfBlock, YouTubeVideoBlock } from "@comet/blocks-admin"; | ||
import { DamVideoBlock } from "@comet/cms-admin"; | ||
import * as React from "react"; | ||
import { FormattedMessage } from "react-intl"; | ||
|
||
export const VideoBlock = createOneOfBlock({ | ||
name: "Video", | ||
displayName: <FormattedMessage id="pages.blocks.video" defaultMessage="Video" />, | ||
category: BlockCategory.Media, | ||
supportedBlocks: { youtubeVideo: YouTubeVideoBlock, damVideo: DamVideoBlock }, | ||
allowEmpty: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { createOneOfBlock } from "@comet/blocks-api/lib/blocks/factories/createOneOfBlock"; | ||
import { YouTubeVideoBlock } from "@comet/blocks-api/lib/blocks/youtube-video.block"; | ||
import { DamVideoBlock } from "@comet/cms-api"; | ||
|
||
export const VideoBlock = createOneOfBlock( | ||
{ | ||
supportedBlocks: { | ||
damVideo: DamVideoBlock, | ||
youtubeVideo: YouTubeVideoBlock, | ||
}, | ||
allowEmpty: true, | ||
}, | ||
{ | ||
name: "Video", | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.