From 4ef11ac4aa5185994db19ef3f69a8c54c70fb06c Mon Sep 17 00:00:00 2001 From: Nick Winans Date: Tue, 16 Feb 2021 14:34:09 -0600 Subject: feat(docs): Add power profiler --- docs/src/components/custom-board-form.js | 100 +++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/src/components/custom-board-form.js (limited to 'docs/src/components/custom-board-form.js') diff --git a/docs/src/components/custom-board-form.js b/docs/src/components/custom-board-form.js new file mode 100644 index 0000000..0279f6b --- /dev/null +++ b/docs/src/components/custom-board-form.js @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +import React from "react"; +import PropTypes from "prop-types"; + +function CustomBoardForm({ + bindPsuType, + bindOutputV, + bindEfficiency, + bindQuiescentMicroA, + bindOtherQuiescentMicroA, +}) { + return ( +
+

Custom Board

+
+
+
+ + +
+
+
+
+ + + {parseFloat(bindOutputV.value).toFixed(1)}V +
+ {bindPsuType.value === "SWITCHING" && ( +
+ + + {Math.round(bindEfficiency.value * 100)}% +
+ )} +
+
+
+ +
+ + µA +
+
+
+ +
+ + µA +
+
+
+
+
+ ); +} + +CustomBoardForm.propTypes = { + bindPsuType: PropTypes.Object, + bindOutputV: PropTypes.Object, + bindEfficiency: PropTypes.Object, + bindQuiescentMicroA: PropTypes.Object, + bindOtherQuiescentMicroA: PropTypes.Object, +}; + +export default CustomBoardForm; -- cgit v1.2.3