From b6f6b1ae9dbaf510d3f05f3cae4482b8adac1fcd Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 10 Mar 2019 10:08:42 +0100 Subject: [PATCH] Enabled stickiness on footer --- src/visits/GraphCard.js | 3 ++- src/visits/GraphCard.scss | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 src/visits/GraphCard.scss diff --git a/src/visits/GraphCard.js b/src/visits/GraphCard.js index 44facee7..b8d8d94c 100644 --- a/src/visits/GraphCard.js +++ b/src/visits/GraphCard.js @@ -3,6 +3,7 @@ import { Doughnut, HorizontalBar } from 'react-chartjs-2'; import PropTypes from 'prop-types'; import React from 'react'; import { keys, values } from 'ramda'; +import './GraphCard.scss'; const propTypes = { title: PropTypes.oneOfType([ PropTypes.string, PropTypes.node ]), @@ -66,7 +67,7 @@ const GraphCard = ({ title, footer, isBarChart, stats, max, redraw = false }) => {title} {renderGraph(title, isBarChart, stats, max, redraw)} - {footer && {footer}} + {footer && {footer}} ); diff --git a/src/visits/GraphCard.scss b/src/visits/GraphCard.scss new file mode 100644 index 00000000..d429901c --- /dev/null +++ b/src/visits/GraphCard.scss @@ -0,0 +1,4 @@ +.graph-card__footer--sticky { + position: sticky; + bottom: 0; +}