- Updated the getLogsForTask function to accept optional parameters for owner and status, allowing for more granular log retrieval based on task state. - Modified the TeamMemberLogsFinder to include owner's session logs when the task is in progress, improving visibility into ongoing activities. - Introduced new UI components for better task tracking, including ActiveTasksBlock and ProvisioningProgressBlock, enhancing user experience during team provisioning. - Refactored related components to support the new functionality, ensuring seamless integration across the application.
34 lines
1.4 KiB
TypeScript
34 lines
1.4 KiB
TypeScript
/* eslint-disable react/jsx-props-no-spreading -- Standard shadcn pattern: forward remaining props to underlying elements */
|
|
import * as React from 'react';
|
|
|
|
import { cn } from '@renderer/lib/utils';
|
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
|
|
const badgeVariants = cva(
|
|
'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--color-border-emphasis)] focus:ring-offset-2',
|
|
{
|
|
variants: {
|
|
variant: {
|
|
default: 'border-transparent bg-[var(--color-text)] text-[var(--color-surface)] shadow',
|
|
secondary:
|
|
'border-transparent bg-[var(--color-surface-raised)] text-[var(--color-text-secondary)]',
|
|
destructive: 'border-transparent bg-red-500 text-white shadow',
|
|
outline: 'border-[var(--color-border)] text-[var(--color-text)]',
|
|
},
|
|
},
|
|
defaultVariants: {
|
|
variant: 'default',
|
|
},
|
|
}
|
|
);
|
|
|
|
export interface BadgeProps
|
|
extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {}
|
|
|
|
const Badge = ({ className, variant, ...props }: BadgeProps): React.JSX.Element => {
|
|
return <span className={cn(badgeVariants({ variant }), className)} {...props} />;
|
|
};
|
|
|
|
// eslint-disable-next-line react-refresh/only-export-components -- Standard shadcn export pattern
|
|
export { Badge, badgeVariants };
|
|
/* eslint-enable react/jsx-props-no-spreading -- Re-enable after shadcn component */
|