meshtastic/src/components/hardware/Badge.tsx

19 lines
457 B
TypeScript
Raw Normal View History

2023-01-19 04:41:44 -08:00
import React from "react";
2022-04-04 05:02:31 -07:00
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>
2022-04-04 05:02:31 -07:00
</div>
);
};