You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: memory-bank/activeContext.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,17 @@ Recent development has focused on:
73
73
-**Flexible Styling**: Allows any valid CSS color value (hex, rgb, rgba, named colors, etc.)
74
74
-**Backward Compatibility**: Optional property that doesn't affect existing implementations
75
75
76
+
11.**CardLayout Title Centering Enhancement**: Added title centering support for CardLayout block:
77
+
78
+
-**New Prop**: Added `centered?: boolean` prop to `CardLayoutBlockProps` for centering title and subtitle
79
+
-**Default Behavior**: Default value is `false`, maintaining backward compatibility (left-aligned by default)
80
+
-**Title Component Enhancement**: Extended `Title` component with `colJustifyContent?: GridJustifyContent` prop for controlling title and subtitle alignment
81
+
-**Responsive Behavior**: Dynamic `colSizes` based on `centered` prop:
82
+
- When `centered === false`: `sm: 8` (allows left-aligned title with narrower column)
83
+
- When `centered === true`: `sm: 12` (full width for centered title)
84
+
-**Implementation Logic**: Uses conditional check `centered ? GridJustifyContent.Center : GridJustifyContent.Start` for alignment and `centered ? 12 : 8` for column size
85
+
-**No Breaking Changes**: All changes are backward compatible with default `centered: false` value
Copy file name to clipboardExpand all lines: src/blocks/CardLayout/__stories__/data.json
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,8 @@
110
110
"content": {
111
111
"type": "card-layout-block",
112
112
"title": "Card layout with basic cards",
113
-
"description": "Three cards in a row on the desktop, two cards in a row on a tablet, one card in a row on a mobile phone."
113
+
"description": "Three cards in a row on the desktop, two cards in a row on a tablet, one card in a row on a mobile phone.",
114
+
"centered": false
114
115
}
115
116
},
116
117
"colSizes": {
@@ -172,6 +173,7 @@
172
173
"type": "card-layout-block",
173
174
"title": "Card layout with background image (basic cards)",
174
175
"description": "Four cards in a row on the desktop, three cards in a row on the mini-desktop, two cards in a row on a tablet, one card in a row on a mobile phone.",
0 commit comments