mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
25 lines
511 B
TypeScript
25 lines
511 B
TypeScript
/**
|
|
* StatIcon Component
|
|
* Icon wrapper for stat cards
|
|
*/
|
|
|
|
import React from 'react'
|
|
import styles from '../../scss/components/cards/stat-icon.module.scss'
|
|
|
|
interface StatIconProps {
|
|
icon: React.ReactNode
|
|
color?: string
|
|
[key: string]: any
|
|
}
|
|
|
|
/**
|
|
* StatIcon - Displays an icon with styled background
|
|
*/
|
|
export const StatIcon = ({ icon, color, ...rest }: StatIconProps) => {
|
|
return (
|
|
<div className={styles.statIcon} style={color ? { color } : undefined} {...rest}>
|
|
{icon}
|
|
</div>
|
|
)
|
|
}
|