mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
feat: add onClick prop and set text type to react node
This commit is contained in:
@@ -1,24 +1,30 @@
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
import Badge from '@/components/Badge';
|
||||
|
||||
import { cn } from '@/lib/helper';
|
||||
import { Color } from '@/types/theme';
|
||||
|
||||
interface StatusBadgeProps {
|
||||
color: Color;
|
||||
text: string;
|
||||
text: ReactNode;
|
||||
className?: {
|
||||
badge?: string;
|
||||
status?: string;
|
||||
};
|
||||
onClick?: () => void;
|
||||
}
|
||||
|
||||
const StatusBadge = ({
|
||||
color = 'neutral',
|
||||
text,
|
||||
className,
|
||||
onClick,
|
||||
}: StatusBadgeProps) => {
|
||||
return (
|
||||
<Badge
|
||||
variant='soft'
|
||||
onClick={onClick}
|
||||
className={{
|
||||
badge: cn(
|
||||
'px-2 py-1 w-full flex flex-row justify-start gap-1 rounded-lg border border-base-content/10 text-xs font-medium text-base-content',
|
||||
|
||||
Reference in New Issue
Block a user