Refactor FooterEnd to accept modifier parameter
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { getItemPageNames, isMobileViewport } from '../../common/config';
|
|
||||||
|
|
||||||
export default function FooterEnd({ items, pageName }) {
|
export default function FooterEnd({modifier}) {
|
||||||
return (
|
return (
|
||||||
<div className={classNames('footer-end', {'footer-end--left': !isMobileViewport() && getItemPageNames(items).includes(pageName)})} >
|
<div className={classNames('footer-end', {[`footer-end__${modifier}`]: modifier})}>
|
||||||
<div className="footer-social">
|
<div className="footer-social">
|
||||||
<div className="footer-social__label">
|
<div className="footer-social__label">
|
||||||
<p>Follow us:</p>
|
<p>Follow us:</p>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
color: var(--color-gray-normal);
|
color: var(--color-gray-normal);
|
||||||
}
|
}
|
||||||
|
|
||||||
&--left {
|
&__in-sidebar {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
margin-top: 100px;
|
margin-top: 100px;
|
||||||
|
|||||||
Reference in New Issue
Block a user