- Created ConsentFilter component with proper styling - Created StatsDisplay component for statistics display - Added ModerationGroupsPage.css to remove inline styles - Removed 83 lines of inline CSS from ModerationGroupsPage - Components now reusable across admin pages - Added container wrappers and titles to both components - Improved code maintainability and separation of concerns
27 lines
779 B
JavaScript
27 lines
779 B
JavaScript
import React from 'react';
|
|
import './StatsDisplay.css';
|
|
|
|
/**
|
|
* StatsDisplay Component
|
|
* Displays statistics in a grid layout
|
|
*
|
|
* @param {Array} stats - Array of stat objects { number, label }
|
|
*/
|
|
const StatsDisplay = ({ stats }) => {
|
|
return (
|
|
<div className="stats-display-container">
|
|
<h2 className="stats-title">Statistiken</h2>
|
|
<div className="stats-display">
|
|
{stats.map((stat, index) => (
|
|
<div key={index} className="stat-item">
|
|
<span className="stat-number">{stat.number}</span>
|
|
<span className="stat-label">{stat.label}</span>
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default StatsDisplay;
|