2020-06-16 22:38:43 +02:00
|
|
|
import React from 'react';
|
|
|
|
import styled from 'styled-components';
|
2020-07-15 22:24:12 +02:00
|
|
|
import PropTypes from 'prop-types';
|
2020-06-16 22:38:43 +02:00
|
|
|
import { prop, remSize } from '../../theme';
|
|
|
|
|
2020-07-15 22:24:12 +02:00
|
|
|
|
2020-07-01 20:52:23 +02:00
|
|
|
const background = prop('MobilePanel.default.background');
|
2020-06-16 22:38:43 +02:00
|
|
|
const textColor = prop('primaryTextColor');
|
|
|
|
|
2020-07-15 22:24:12 +02:00
|
|
|
const FooterWrapper = styled.div`
|
2020-06-16 22:38:43 +02:00
|
|
|
position: fixed;
|
|
|
|
width: 100%;
|
2020-07-15 22:24:12 +02:00
|
|
|
bottom: 0;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const FooterContent = styled.div`
|
2020-06-16 22:38:43 +02:00
|
|
|
background: ${background};
|
|
|
|
color: ${textColor};
|
|
|
|
padding: ${remSize(12)};
|
|
|
|
padding-left: ${remSize(32)};
|
|
|
|
`;
|
|
|
|
|
2020-07-15 22:24:12 +02:00
|
|
|
|
|
|
|
const Footer = ({ before, children }) => (
|
|
|
|
<FooterWrapper>
|
|
|
|
{before}
|
|
|
|
<FooterContent>
|
|
|
|
{children}
|
|
|
|
</FooterContent>
|
|
|
|
</FooterWrapper>
|
|
|
|
);
|
|
|
|
|
|
|
|
Footer.propTypes = {
|
|
|
|
before: PropTypes.element,
|
|
|
|
children: PropTypes.element
|
|
|
|
};
|
|
|
|
|
|
|
|
Footer.defaultProps = {
|
|
|
|
before: <></>,
|
|
|
|
children: <></>
|
|
|
|
};
|
|
|
|
|
2020-06-16 22:38:43 +02:00
|
|
|
export default Footer;
|