Enabled stickiness on footer

This commit is contained in:
Alejandro Celaya 2019-03-10 10:08:42 +01:00
parent 1ad4290487
commit b6f6b1ae9d
2 changed files with 6 additions and 1 deletions

View file

@ -3,6 +3,7 @@ import { Doughnut, HorizontalBar } from 'react-chartjs-2';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React from 'react'; import React from 'react';
import { keys, values } from 'ramda'; import { keys, values } from 'ramda';
import './GraphCard.scss';
const propTypes = { const propTypes = {
title: PropTypes.oneOfType([ PropTypes.string, PropTypes.node ]), title: PropTypes.oneOfType([ PropTypes.string, PropTypes.node ]),
@ -66,7 +67,7 @@ const GraphCard = ({ title, footer, isBarChart, stats, max, redraw = false }) =>
<Card className="mt-4"> <Card className="mt-4">
<CardHeader className="graph-card__header">{title}</CardHeader> <CardHeader className="graph-card__header">{title}</CardHeader>
<CardBody>{renderGraph(title, isBarChart, stats, max, redraw)}</CardBody> <CardBody>{renderGraph(title, isBarChart, stats, max, redraw)}</CardBody>
{footer && <CardFooter>{footer}</CardFooter>} {footer && <CardFooter className="graph-card__footer--sticky">{footer}</CardFooter>}
</Card> </Card>
); );

View file

@ -0,0 +1,4 @@
.graph-card__footer--sticky {
position: sticky;
bottom: 0;
}