mirror of
https://github.com/meshtastic/meshtastic.git
synced 2025-03-05 21:00:08 -08:00
19 lines
437 B
TypeScript
19 lines
437 B
TypeScript
import React from "react";
|
|
|
|
export interface BadgeProps {
|
|
name: string;
|
|
color: string;
|
|
icon: React.ReactNode;
|
|
}
|
|
|
|
export const Badge = ({ name, color, icon }: BadgeProps): JSX.Element => {
|
|
return (
|
|
<div
|
|
className={`flex h-min cursor-pointer gap-1 rounded-md px-1 text-white shadow-md hover:opacity-80 ${color}`}
|
|
>
|
|
<div className="my-1">{icon}</div>
|
|
<span className="hidden truncate md:flex">{name}</span>
|
|
</div>
|
|
);
|
|
};
|