Add battery-soc jsx template
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
---
|
||||
label: battery-soc voorbeeld
|
||||
description: Batterij laadstatus met laadvermogen
|
||||
type: battery-soc
|
||||
author: maik
|
||||
---
|
||||
|
||||
import React from 'react';
|
||||
|
||||
export default function BatterySocTemplate({ data }) {
|
||||
const soc = data?.soc ?? 0;
|
||||
return (
|
||||
<div className="widget-soc">
|
||||
<div className="widget-soc__ring" style={{ '--soc': `${soc}%` }} />
|
||||
<div className="widget-soc__value">{soc.toFixed(0)}%</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user