2018-01-17 21:40:10 +02:00
|
|
|
import React from 'react';
|
|
|
|
import styled from 'styled-components';
|
2017-11-23 14:18:38 +02:00
|
|
|
import remcalc from 'remcalc';
|
2018-01-17 21:40:10 +02:00
|
|
|
import is from 'styled-is';
|
2017-11-23 14:18:38 +02:00
|
|
|
|
2018-01-17 21:40:10 +02:00
|
|
|
import Baseline from '../baseline';
|
|
|
|
import { ViewContainer } from '../layout';
|
|
|
|
|
|
|
|
const Container = ViewContainer.extend`
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
align-content: stretch;
|
|
|
|
align-items: stretch;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const Footer = styled.div`
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
align-content: stretch;
|
|
|
|
align-items: stretch;
|
2017-11-23 14:18:38 +02:00
|
|
|
background-color: rgba(241, 241, 241, 1);
|
|
|
|
border-top: ${remcalc(1)} solid ${props => props.theme.grey};
|
2018-01-17 21:40:10 +02:00
|
|
|
max-height: ${remcalc(53)};
|
|
|
|
min-height: ${remcalc(53)};
|
|
|
|
line-height: ${remcalc(25)};
|
2017-11-23 14:18:38 +02:00
|
|
|
|
|
|
|
height: ${remcalc(70)};
|
|
|
|
max-height: ${remcalc(70)};
|
2018-01-17 21:40:10 +02:00
|
|
|
|
|
|
|
${is('fixed')`
|
|
|
|
position: fixed;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
`};
|
|
|
|
|
|
|
|
${is('bottom', 'fixed')`
|
|
|
|
bottom: 0;
|
|
|
|
`};
|
2017-11-23 14:18:38 +02:00
|
|
|
`;
|
2018-01-17 21:40:10 +02:00
|
|
|
|
|
|
|
export default Baseline(({ children, fluid, ...rest }) => (
|
|
|
|
<Footer {...rest}>
|
|
|
|
<Container fluid={fluid}>{children}</Container>
|
|
|
|
</Footer>
|
|
|
|
));
|