Skip to content

Commit 9dda6f6

Browse files
committed
feat(Header): add props for elements className
1 parent 59f91e8 commit 9dda6f6

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/blocks/Header/Header.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ import {BREAKPOINTS} from '../../constants';
1919

2020
const b = block('header-block');
2121

22-
export type HeaderBlockFullProps = HeaderBlockProps & ClassNameProps;
22+
type ElementsClassName = {
23+
gridClassName?: string;
24+
mediaClassName?: string;
25+
};
26+
27+
export type HeaderBlockFullProps = HeaderBlockProps & ClassNameProps & ElementsClassName;
2328

2429
interface BackgroundProps {
2530
background: HeaderBlockBackground;
@@ -78,13 +83,15 @@ export const HeaderBlock = (props: React.PropsWithChildren<HeaderBlockFullProps>
7883
theme: textTheme = 'light',
7984
verticalOffset = 'm',
8085
className,
86+
gridClassName,
8187
breadcrumbs,
8288
status,
8389
renderTitle,
8490
children,
8591
mediaView = 'full',
8692
centered,
8793
additionalInfo,
94+
mediaClassName,
8895
} = props;
8996
const windowWidth = useWindowWidth();
9097
const isMobile = windowWidth <= BREAKPOINTS.sm;
@@ -122,7 +129,7 @@ export const HeaderBlock = (props: React.PropsWithChildren<HeaderBlockFullProps>
122129
>
123130
{backgroundThemed && fullWidth && <FullWidthBackground background={backgroundThemed} />}
124131
{backgroundThemed && <Background background={backgroundThemed} isMobile={isMobile} />}
125-
<Grid containerClass={b('container-fluid')}>
132+
<Grid containerClass={b('container-fluid')} className={b(null, gridClassName)}>
126133
{breadcrumbs && (
127134
<Row className={b('breadcrumbs')}>
128135
<Col>
@@ -212,7 +219,7 @@ export const HeaderBlock = (props: React.PropsWithChildren<HeaderBlockFullProps>
212219
</Row>
213220
{hasRightSideImage && (
214221
<Media
215-
className={b('media', {[curImageSize]: true})}
222+
className={b('media', {[curImageSize]: true}, mediaClassName)}
216223
videoClassName={b('video')}
217224
imageClassName={b('image')}
218225
{...mediaWithMicrodata}

0 commit comments

Comments
 (0)