Skip to content

Commit 3601e7f

Browse files
authored
feat: added '0' vertical offset for header block (#751)
1 parent c182c81 commit 3601e7f

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/blocks/Header/__stories__/Header.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ There could be only one one Header block on the page.
4444

4545
`theme?: default | dark` — Sets the text color (black by default, white for the dark background).
4646

47-
`verticalOffset?: 's' | 'm' | 'l' | 'xl'` — Top and bottom offsets from the text. (Values: 's' - 48px, 'm' - 80px, 'l' - 112px, 'xl' - 144px.)
47+
`verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl'` — Top and bottom offsets from the text. (Values: '0' - 0px, 's' - 48px, 'm' - 80px, 'l' - 112px, 'xl' - 144px.)
4848
</StoryTemplate>
4949

5050
`mediaView?: full | fit` — full is default value, the media content covers all widht and height. Fit - media content has real sizes and locates in the middle

src/blocks/Header/__stories__/Header.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const FitTemplate: StoryFn<HeaderBlockModel> = (args) => (
8080

8181
const VerticalOffsetTemplate: StoryFn<HeaderBlockModel> = (args) => (
8282
<Fragment>
83+
<DefaultTemplate {...args} title={getVerticalOffsetTitle('«0»')} verticalOffset="0" />
8384
<DefaultTemplate {...args} title={getVerticalOffsetTitle('«S»')} verticalOffset="s" />
8485
<DefaultTemplate {...args} title={getVerticalOffsetTitle('«M»')} verticalOffset="m" />
8586
<DefaultTemplate {...args} title={getVerticalOffsetTitle('«L»')} verticalOffset="l" />

src/blocks/Header/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const HeaderProperties = {
6767
},
6868
verticalOffset: {
6969
type: 'string',
70-
enum: ['s', 'm', 'l', 'xl'],
70+
enum: ['0', 's', 'm', 'l', 'xl'],
7171
},
7272
background: withTheme(HeaderBackgroundProps),
7373
theme: {

src/models/constructor-items/blocks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export interface HeaderBlockProps {
156156
mediaView?: 'fit' | 'full';
157157
background?: ThemedHeaderBlockBackground;
158158
theme?: 'light' | 'dark';
159-
verticalOffset?: 's' | 'm' | 'l' | 'xl';
159+
verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl';
160160
breadcrumbs?: HeaderBreadCrumbsProps;
161161
status?: JSX.Element;
162162
renderTitle?: (title: string) => React.ReactNode;

0 commit comments

Comments
 (0)