From 3537817cd20ea9823b5aee03d682c9125dd6021e Mon Sep 17 00:00:00 2001 From: Gertjan van Oosten Date: Wed, 16 Sep 2020 13:50:40 +0200 Subject: [PATCH] NCI-Agency/anet#3172: Add Geo layout placeholder story --- client/src/layouts/geoLayout.js | 15 ++++++++------- client/stories/HeatMap.stories.js | 7 +++++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/client/src/layouts/geoLayout.js b/client/src/layouts/geoLayout.js index 7822afe824..1f87d34dd3 100644 --- a/client/src/layouts/geoLayout.js +++ b/client/src/layouts/geoLayout.js @@ -1,12 +1,13 @@ import PropTypes from "prop-types" -import React from "react" -const geoLayout = ({ item, dimensions }) => { - return ( - <> - Hello {item} {dimensions} - - ) +const geoLayout = (item, dimensions) => { + // FIXME: do something useful instead + return { + x: 0, + y: 0, + width: dimensions.width, + height: dimensions.height + } } geoLayout.propTypes = { item: PropTypes.object, diff --git a/client/stories/HeatMap.stories.js b/client/stories/HeatMap.stories.js index ab916d4592..627115dfcc 100644 --- a/client/stories/HeatMap.stories.js +++ b/client/stories/HeatMap.stories.js @@ -40,6 +40,13 @@ Month.args = { layoutType: layouts.TYPES.MONTH } +export const Geo = Template.bind({}) + +Geo.args = { + ...defaultArgs, + layoutType: layouts.TYPES.GEO +} + export default { title: "ANET/HeatMap", component: HeatMap