From f5b77543d74bcd5e4634b305d930622d75b5bc14 Mon Sep 17 00:00:00 2001 From: maik Date: Thu, 20 Aug 2026 22:48:18 +0000 Subject: [PATCH] Add kpi jsx template --- templates/jsx/kpi/kpi-example.jsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 templates/jsx/kpi/kpi-example.jsx diff --git a/templates/jsx/kpi/kpi-example.jsx b/templates/jsx/kpi/kpi-example.jsx new file mode 100644 index 0000000..8674fe9 --- /dev/null +++ b/templates/jsx/kpi/kpi-example.jsx @@ -0,0 +1,20 @@ +--- +label: kpi voorbeeld +description: Generieke KPI-kaart (configurable) +type: kpi +author: maik +--- + +import React from 'react'; + +export default function KpiTemplate({ data, config }) { + const value = data?.[config.value_key] ?? 0; + return ( +
+
{config.title}
+
+ {value.toFixed(config.precision ?? 0)} {config.unit ?? ''} +
+
+ ); +}