Skip to content

Commit

Permalink
fix: added mediaView to Banner-block schema (#801)
Browse files Browse the repository at this point in the history
  • Loading branch information
VitaliiDC8 authored Feb 2, 2024
1 parent c7b0d48 commit de78586
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/blocks/Banner/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
BaseProps,
ButtonBlock,
ThemeProps,
mediaView,
withTheme,
} from '../../schema/validators/common';

Expand All @@ -23,6 +24,10 @@ export const BannerCardProps = {
image: withTheme({
type: 'string',
}),
mediaView: {
type: 'string',
enum: mediaView,
},
disableCompress: {
type: 'boolean',
},
Expand Down
3 changes: 2 additions & 1 deletion src/blocks/Header/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
ButtonBlock,
MediaProps,
VideoProps,
mediaView,
withTheme,
} from '../../schema/validators/common';
import {filteredArray} from '../../schema/validators/utils';
Expand Down Expand Up @@ -46,7 +47,7 @@ export const HeaderProperties = {
video: withTheme(VideoProps),
mediaView: {
type: 'string',
enum: ['fit', 'full'],
enum: mediaView,
},
backLink: {
type: 'object',
Expand Down
1 change: 1 addition & 0 deletions src/schema/validators/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const dividerEnum = {enum: ['0', 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl',
export const sizeNumber = {type: 'number', maximum: 12, minimum: 1};
export const contentThemes = ['default', 'dark', 'light'];
export const quoteTypes = Object.values(QuoteType);
export const mediaView = ['fit', 'full'];
export const customControlsType = [
CustomControlsType.WithMuteButton,
CustomControlsType.WithPlayPauseButton,
Expand Down

0 comments on commit de78586

Please sign in to comment.