Skip to content

Commit a7f96b3

Browse files
authored
feat: add additional info (#1171)
1 parent 21618af commit a7f96b3

File tree

28 files changed

+38
-2
lines changed

28 files changed

+38
-2
lines changed

src/blocks/Header/Header.scss

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ $block: '.#{$ns}header-block';
55
$backgroundWidth: 1440px;
66

77
#{$block} {
8+
$root: &;
9+
810
position: relative;
911

1012
&_full-width {
@@ -36,6 +38,14 @@ $backgroundWidth: 1440px;
3638
color: var(--g-color-text-light-primary);
3739
}
3840
}
41+
42+
#{$block}__additional-info {
43+
.yfm p {
44+
color: var(
45+
--g-color-text-light-secondary
46+
) !important; /* stylelint-disable-line declaration-no-important */ // the selector that interrupts this color is too big;
47+
}
48+
}
3949
}
4050

4151
&_vertical-offset {
@@ -97,6 +107,17 @@ $backgroundWidth: 1440px;
97107
}
98108
}
99109

110+
&__additional-info {
111+
margin-top: $indentXS;
112+
113+
.yfm p {
114+
@include text-size(body-2);
115+
color: var(
116+
--g-color-text-secondary
117+
) !important; /* stylelint-disable-line declaration-no-important */ // the selector that interrupts this color is too big
118+
}
119+
}
120+
100121
&__buttons {
101122
margin-top: $indentXS;
102123
}
@@ -106,7 +127,7 @@ $backgroundWidth: 1440px;
106127
margin-top: $indentXS;
107128

108129
&:not(:last-child) {
109-
margin-right: $indentXS;
130+
margin-right: $indentXXS;
110131
}
111132
}
112133
}

src/blocks/Header/Header.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export const HeaderBlock = (props: React.PropsWithChildren<HeaderBlockFullProps>
8383
children,
8484
mediaView = 'full',
8585
centered,
86+
additionalInfo,
8687
} = props;
8788
const isMobile = React.useContext(MobileContext);
8889
const theme = useTheme();
@@ -165,6 +166,17 @@ export const HeaderBlock = (props: React.PropsWithChildren<HeaderBlockFullProps>
165166
/>
166167
</div>
167168
)}
169+
{additionalInfo && (
170+
<div className={b('additional-info', {theme: textTheme})}>
171+
<YFMWrapper
172+
content={additionalInfo}
173+
modifiers={{
174+
constructor: true,
175+
constructorTheme: textTheme,
176+
}}
177+
/>
178+
</div>
179+
)}
168180
{buttons && (
169181
<div className={b('buttons')} data-qa="header-buttons">
170182
{buttons.map((button, index) => (
22.9 KB
Loading
-53.5 KB
Loading
22.3 KB
Loading
45.4 KB
Loading
30.4 KB
Loading
59.1 KB
Loading
9.32 KB
Loading
19.9 KB
Loading

0 commit comments

Comments
 (0)