19 lines
551 B
TypeScript
19 lines
551 B
TypeScript
|
|
import type { Icon, IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
||
|
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||
|
|
|
||
|
|
type BadgeProps = {
|
||
|
|
icon?: Icon | IconDefinition;
|
||
|
|
text: string;
|
||
|
|
};
|
||
|
|
|
||
|
|
const Badge = ({ icon, text }: BadgeProps) => {
|
||
|
|
return (
|
||
|
|
<span className="text-md font-medium inline-flex items-center px-2.5 py-0.5 rounded-sm me-2 bg-blue-900 text-blue-200 border border-blue-500 space-x-2">
|
||
|
|
{icon && <FontAwesomeIcon icon={icon} />}
|
||
|
|
<span>{text}</span>
|
||
|
|
</span>
|
||
|
|
);
|
||
|
|
};
|
||
|
|
|
||
|
|
export default Badge;
|