Skip to content

Commit

Permalink
feat: added MediaView type
Browse files Browse the repository at this point in the history
  • Loading branch information
VitaliiDC8 committed Feb 2, 2024
1 parent b99b69c commit 86f5c14
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/models/constructor-items/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
MapProps,
MediaDirection,
MediaProps,
MediaView,
TextSize,
TextTheme,
ThemedImage,
Expand Down Expand Up @@ -159,7 +160,7 @@ export interface HeaderBlockProps {
offset?: HeaderOffset;
image?: ThemedImage;
video?: ThemedMediaVideoProps;
mediaView?: 'fit' | 'full';
mediaView?: MediaView;
background?: ThemedHeaderBlockBackground;
theme?: 'light' | 'dark';
verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl';
Expand Down
2 changes: 2 additions & 0 deletions src/models/constructor-items/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ export interface TitleItemBaseProps {
onClick?: () => void;
}

export type MediaView = 'fit' | 'full';

// card
export type MediaBorder = 'shadow' | 'line' | 'none';
export type CardBorder = MediaBorder;
Expand Down
3 changes: 2 additions & 1 deletion src/models/constructor-items/sub-blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
ImageProps,
LinkProps,
MediaProps,
MediaView,
PriceDetailedProps,
TextTheme,
Themable,
Expand Down Expand Up @@ -144,7 +145,7 @@ export interface BannerCardProps {
color?: ThemeSupporting<string>;
theme?: TextTheme;
button: Pick<ButtonProps, 'text' | 'url' | 'target' | 'theme'>;
mediaView?: 'fit' | 'full';
mediaView?: MediaView;
}

export interface MediaCardProps extends MediaProps, AnalyticsEventsBase, CardBaseProps {}
Expand Down

0 comments on commit 86f5c14

Please sign in to comment.