From 82905422697c0cea08b823591a3a8f03f12ba57d Mon Sep 17 00:00:00 2001 From: Pixelastic Date: Thu, 3 Sep 2015 17:25:57 +0200 Subject: [PATCH] feat: Add stats widget --- components/Stats/index.js | 31 +++++++++++++++++++++++++++++++ example/app.js | 6 ++++++ example/index.html | 1 + index.js | 5 +++-- widgets/stats/index.js | 28 ++++++++++++++++++++++++++++ widgets/stats/template.html | 4 ++++ 6 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 components/Stats/index.js create mode 100644 widgets/stats/index.js create mode 100644 widgets/stats/template.html diff --git a/components/Stats/index.js b/components/Stats/index.js new file mode 100644 index 0000000000..2c5a7b85a0 --- /dev/null +++ b/components/Stats/index.js @@ -0,0 +1,31 @@ +var React = require('react'); + +var Template = require('../Template/'); + +class Stats extends React.Component { + render() { + var template = this.props.template; + var data = { + nbHits: this.props.nbHits, + processingTimeMS: this.props.processingTimeMS + }; + + return ( +