Skip to content

Commit 454f41e

Browse files
authored
feat: add title className for CardsLayout (#565)
1 parent b971add commit 454f41e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/blocks/CardLayout/CardLayout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ const CardLayout: React.FC<CardLayoutBlockProps> = ({
2828
colSizes = DEFAULT_SIZES,
2929
children,
3030
className,
31+
titleClassName,
3132
}) => (
3233
<AnimateBlock className={b(null, className)} animate={animated}>
33-
{(title || description) && <Title title={title} subtitle={description} />}
34+
{(title || description) && (
35+
<Title title={title} subtitle={description} className={titleClassName} />
36+
)}
3437
<Row>
3538
{React.Children.map(children, (child, index) => (
3639
<Col key={index} sizes={colSizes} className={b('item')}>

src/models/constructor-items/blocks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ export interface TabsBlockProps extends Animatable {
288288

289289
export interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {
290290
title?: TitleItemProps | string;
291+
titleClassName?: string;
291292
description?: string;
292293
colSizes?: GridColumnSizesType;
293294
}

0 commit comments

Comments
 (0)