Add Badge component and use it for performance page ratings

This commit is contained in:
Mike Cao committed 2026-03-15 20:44:25 -07:00
1 parent 4aa5f8411e
commit 31f322630d
4 files changed
+110 -16

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import styles from './Badge.module.css';
export interface BadgeProps {
variant: 'good' | 'warning' | 'danger' | 'gray';
children: React.ReactNode;
dot?: boolean;
}
export function Badge({ variant, children, dot = true }: BadgeProps) {
return (
<span className={`${styles.badge} ${styles[variant]}`}>
{dot && <span className={styles.dot} />}
{children}
</span>
);
}