mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
feat: tv request modal status hookup
This commit is contained in:
29
src/components/Common/Badge/index.tsx
Normal file
29
src/components/Common/Badge/index.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import React from 'react';
|
||||
|
||||
interface BadgeProps {
|
||||
badgeType?: 'default' | 'primary' | 'danger' | 'warning' | 'success';
|
||||
}
|
||||
|
||||
const Badge: React.FC<BadgeProps> = ({ badgeType = 'default', children }) => {
|
||||
const badgeStyle = [
|
||||
'px-2 inline-flex text-xs leading-5 font-semibold rounded-full',
|
||||
];
|
||||
|
||||
switch (badgeType) {
|
||||
case 'danger':
|
||||
badgeStyle.push('bg-red-600 text-red-100');
|
||||
break;
|
||||
case 'warning':
|
||||
badgeStyle.push('bg-orange-400 text-orange-100');
|
||||
break;
|
||||
case 'success':
|
||||
badgeStyle.push('bg-green-500 text-green-100');
|
||||
break;
|
||||
default:
|
||||
badgeStyle.push('bg-indigo-500 text-indigo-100');
|
||||
}
|
||||
|
||||
return <span className={badgeStyle.join(' ')}>{children}</span>;
|
||||
};
|
||||
|
||||
export default Badge;
|
Reference in New Issue
Block a user