Skip to content

Commit 48ba404

Browse files
aleksey-shkadovbablos
andauthored
feat: add className property for banner block (#1031)
Co-authored-by: bablos <[email protected]>
1 parent 4df5f77 commit 48ba404

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/blocks/Banner/Banner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import './Banner.scss';
1010
const b = block('banner-block');
1111

1212
export const BannerBlock = (props: BannerBlockProps) => {
13-
const {animated, ...bannerProps} = props;
13+
const {animated, className, ...bannerProps} = props;
1414

1515
return (
16-
<AnimateBlock className={b()} animate={animated}>
16+
<AnimateBlock className={b(null, className)} animate={animated}>
1717
<BannerCard {...bannerProps} />
1818
</AnimateBlock>
1919
);

src/blocks/Banner/__stories__/data.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"content": {
44
"theme": "dark",
55
"type": "banner-block",
6+
"className": "",
67
"title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
78
"subtitle": "<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> ",
89
"image": "/story-assets/img_8-12_dark.png",
@@ -18,6 +19,7 @@
1819
"content": {
1920
"theme": "light",
2021
"type": "banner-block",
22+
"className": "",
2123
"title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
2224
"subtitle": "<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> ",
2325
"image": {

src/models/constructor-items/sub-blocks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export interface BasicCardProps
157157
export interface BannerCardProps {
158158
title: string;
159159
subtitle?: string;
160+
className?: string;
160161
image?: ThemeSupporting<string>;
161162
disableCompress?: boolean;
162163
color?: ThemeSupporting<string>;

0 commit comments

Comments
 (0)