mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
41 lines
1.0 KiB
JavaScript
41 lines
1.0 KiB
JavaScript
/*
|
|
* Copyright (c) 2025 by Christian Kellner.
|
|
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
|
|
*/
|
|
|
|
/*
|
|
* Copyright (c) 2025 by Christian Kellner.
|
|
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
|
|
*/
|
|
import React from 'react';
|
|
|
|
import './DashboardCard.less';
|
|
|
|
export default function KpiCard({
|
|
title,
|
|
icon,
|
|
value,
|
|
valueFontSize = '1.5rem',
|
|
description,
|
|
color = 'gray',
|
|
children,
|
|
}) {
|
|
return (
|
|
<div className={`dashboard-card ${color}`}>
|
|
<div className="dashboard-card__header">
|
|
<div className="dashboard-card__icon">{icon}</div>
|
|
<div className="dashboard-card__title">
|
|
<span>{title}</span>
|
|
</div>
|
|
</div>
|
|
<div className="dashboard-card__content">
|
|
<p className="dashboard-card__value" style={{ fontSize: valueFontSize }}>
|
|
{value}
|
|
{children}
|
|
</p>
|
|
{description && <span className="dashboard-card__desc">{description}</span>}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|