diff --git a/src/blocks/Banner/__stories__/Banner.mdx b/src/blocks/Banner/__stories__/Banner.mdx index 4013df817..916cf84a0 100644 --- a/src/blocks/Banner/__stories__/Banner.mdx +++ b/src/blocks/Banner/__stories__/Banner.mdx @@ -19,7 +19,7 @@ import * as BannerStories from './Banner.stories.tsx'; `color?: string` — Background color -`button: Button` — Button +`button?: Button` — Button `mediaView?: full | fit` — full is default value, the media content covers all width and height. Fit - media content has real sizes and locates in the middle diff --git a/src/models/constructor-items/sub-blocks.ts b/src/models/constructor-items/sub-blocks.ts index 2e48346ec..1d82d9639 100644 --- a/src/models/constructor-items/sub-blocks.ts +++ b/src/models/constructor-items/sub-blocks.ts @@ -162,7 +162,7 @@ export interface BannerCardProps { disableCompress?: boolean; color?: ThemeSupporting; theme?: TextTheme; - button: Pick; + button?: Pick; mediaView?: MediaView; } diff --git a/src/sub-blocks/BannerCard/BannerCard.tsx b/src/sub-blocks/BannerCard/BannerCard.tsx index 482bfce0f..3510a7d2d 100644 --- a/src/sub-blocks/BannerCard/BannerCard.tsx +++ b/src/sub-blocks/BannerCard/BannerCard.tsx @@ -13,7 +13,7 @@ export const BannerCard = (props: BannerCardProps) => { const { title, subtitle, - button: {url, text, target, theme: buttonTheme = 'raised'}, + button: {url, text, target, theme: buttonTheme = 'raised'} = {}, color, theme: textTheme = 'light', image, @@ -43,16 +43,19 @@ export const BannerCard = (props: BannerCardProps) => { /> )} - -