Skip to content

Commit

Permalink
feat: added '0' vertical offset for header block (#751)
Browse files Browse the repository at this point in the history
  • Loading branch information
VitaliiDC8 authored and qradle-yndx committed Jan 9, 2024
1 parent 27afd6e commit 1101da9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/blocks/Header/__stories__/Header.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ There could be only one one Header block on the page.

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

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

`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
1 change: 1 addition & 0 deletions src/blocks/Header/__stories__/Header.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const FitTemplate: StoryFn<HeaderBlockModel> = (args) => (

const VerticalOffsetTemplate: StoryFn<HeaderBlockModel> = (args) => (
<Fragment>
<DefaultTemplate {...args} title={getVerticalOffsetTitle('«0»')} verticalOffset="0" />
<DefaultTemplate {...args} title={getVerticalOffsetTitle('«S»')} verticalOffset="s" />
<DefaultTemplate {...args} title={getVerticalOffsetTitle('«M»')} verticalOffset="m" />
<DefaultTemplate {...args} title={getVerticalOffsetTitle('«L»')} verticalOffset="l" />
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/Header/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const HeaderProperties = {
},
verticalOffset: {
type: 'string',
enum: ['s', 'm', 'l', 'xl'],
enum: ['0', 's', 'm', 'l', 'xl'],
},
background: withTheme(HeaderBackgroundProps),
theme: {
Expand Down
2 changes: 1 addition & 1 deletion src/models/constructor-items/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export interface HeaderBlockProps {
mediaView?: 'fit' | 'full';
background?: ThemedHeaderBlockBackground;
theme?: 'light' | 'dark';
verticalOffset?: 's' | 'm' | 'l' | 'xl';
verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl';
breadcrumbs?: HeaderBreadCrumbsProps;
status?: JSX.Element;
renderTitle?: (title: string) => React.ReactNode;
Expand Down

0 comments on commit 1101da9

Please sign in to comment.