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
Map blocks support the same enhanced title functionality as Media blocks:
113
+
114
+
**Usage Examples**:
115
+
116
+
```typescript
117
+
// Map with custom title size
118
+
{
119
+
type: 'map-block',
120
+
title: {
121
+
text: 'Our Location',
122
+
textSize: 'l'
123
+
},
124
+
map: { /* map config */ }
125
+
}
126
+
127
+
// Map with clickable title
128
+
{
129
+
type: 'map-block',
130
+
title: {
131
+
text: 'View on Google Maps',
132
+
url: 'https://maps.google.com/...',
133
+
urlTitle: 'Open in Google Maps'
134
+
},
135
+
map: { /* map config */ }
136
+
}
137
+
138
+
// Map with custom content
139
+
{
140
+
type: 'map-block',
141
+
title: {
142
+
text: 'Office Location',
143
+
custom: '📍',
144
+
textSize: 'm'
145
+
},
146
+
map: { /* map config */ }
147
+
}
148
+
```
149
+
98
150
## Usage Patterns
99
151
100
152
> **Note**: In the code examples below, `b()` is a utility function used throughout the page-constructor project for BEM (Block Element Modifier) class naming. It generates CSS class names following the BEM methodology, making the code more maintainable and consistent.
@@ -249,6 +301,7 @@ The Map component includes Storybook stories demonstrating:
249
301
- Yandex Maps integration with coordinate-based markers
250
302
- Different zoom levels and configurations
251
303
- API key input for development/testing
304
+
- Enhanced title support
252
305
253
306
Stories are located in `src/components/Map/__stories__/Map.stories.tsx` with example data in `data.json`.
Copy file name to clipboardExpand all lines: src/blocks/Map/__stories__/Map.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ import * as MapStories from './Map.stories.tsx';
10
10
11
11
`type: map-block`
12
12
13
-
`title: string` — Title.
13
+
`title: string | TitleItemBaseProps` — Title. Can be a simple string or an object with additional properties like `textSize`, `url`, `urlTitle`, `custom`, and `onClick`.
Copy file name to clipboardExpand all lines: src/blocks/Media/__stories__/Media.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ import * as MediaStories from './Media.stories.tsx';
9
9
10
10
`type: media-block`
11
11
12
-
`title: string` — Title.
12
+
`title: string | TitleItemBaseProps` — Title. Can be a simple string or an object with additional properties like `textSize`, `url`, `urlTitle`, `custom`, and `onClick`.
0 commit comments