Skip to content

Commit

Permalink
feat: add className property for banner block (#1031)
Browse files Browse the repository at this point in the history
Co-authored-by: bablos <[email protected]>
  • Loading branch information
aleksey-shkadov and bablos authored Sep 25, 2024
1 parent 4df5f77 commit 48ba404
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/blocks/Banner/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import './Banner.scss';
const b = block('banner-block');

export const BannerBlock = (props: BannerBlockProps) => {
const {animated, ...bannerProps} = props;
const {animated, className, ...bannerProps} = props;

return (
<AnimateBlock className={b()} animate={animated}>
<AnimateBlock className={b(null, className)} animate={animated}>
<BannerCard {...bannerProps} />
</AnimateBlock>
);
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Banner/__stories__/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"content": {
"theme": "dark",
"type": "banner-block",
"className": "",
"title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
"subtitle": "<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> ",
"image": "/story-assets/img_8-12_dark.png",
Expand All @@ -18,6 +19,7 @@
"content": {
"theme": "light",
"type": "banner-block",
"className": "",
"title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
"subtitle": "<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> ",
"image": {
Expand Down
1 change: 1 addition & 0 deletions src/models/constructor-items/sub-blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export interface BasicCardProps
export interface BannerCardProps {
title: string;
subtitle?: string;
className?: string;
image?: ThemeSupporting<string>;
disableCompress?: boolean;
color?: ThemeSupporting<string>;
Expand Down

0 comments on commit 48ba404

Please sign in to comment.