mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-28 16:27:08 -05:00
Compare commits
2 Commits
aed16f688a
...
edit/edt-a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8bea4b798 | ||
|
|
250e7c488a |
@@ -1,14 +1,12 @@
|
|||||||
import { ChevronDown, ChevronUp } from 'lucide-react';
|
import { ChevronDown, ChevronUp } from 'lucide-react';
|
||||||
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@/components/ui/collapsible';
|
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@/components/ui/collapsible';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Badge } from '@/components/ui/badge';
|
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
interface DetailedViewCollapsibleProps {
|
interface DetailedViewCollapsibleProps {
|
||||||
isCollapsed: boolean;
|
isCollapsed: boolean;
|
||||||
onToggle: () => void;
|
onToggle: () => void;
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
fieldCount?: number;
|
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,7 +18,6 @@ export function DetailedViewCollapsible({
|
|||||||
isCollapsed,
|
isCollapsed,
|
||||||
onToggle,
|
onToggle,
|
||||||
children,
|
children,
|
||||||
fieldCount,
|
|
||||||
className
|
className
|
||||||
}: DetailedViewCollapsibleProps) {
|
}: DetailedViewCollapsibleProps) {
|
||||||
return (
|
return (
|
||||||
@@ -30,35 +27,25 @@ export function DetailedViewCollapsible({
|
|||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
className="w-full flex items-center justify-between hover:bg-muted/50 p-2 h-auto transition-colors"
|
className="w-full flex items-center justify-between hover:bg-muted/50 p-2 h-auto"
|
||||||
>
|
>
|
||||||
<div className="flex items-center gap-2">
|
<div className="text-xs font-semibold text-muted-foreground uppercase tracking-wide">
|
||||||
<span className="text-xs font-semibold text-muted-foreground uppercase tracking-wide">
|
All Fields (Detailed View)
|
||||||
All Fields (Detailed View)
|
|
||||||
</span>
|
|
||||||
{fieldCount !== undefined && fieldCount > 0 && (
|
|
||||||
<Badge
|
|
||||||
variant="secondary"
|
|
||||||
className="h-5 px-1.5 text-xs font-normal transition-transform duration-200 hover:scale-105"
|
|
||||||
>
|
|
||||||
{fieldCount}
|
|
||||||
</Badge>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span className="text-xs text-muted-foreground normal-case font-normal">
|
<span className="text-xs text-muted-foreground normal-case font-normal">
|
||||||
{isCollapsed ? 'Show' : 'Hide'}
|
{isCollapsed ? 'Show' : 'Hide'}
|
||||||
</span>
|
</span>
|
||||||
{isCollapsed ? (
|
{isCollapsed ? (
|
||||||
<ChevronDown className="h-4 w-4 text-muted-foreground transition-transform duration-200" />
|
<ChevronDown className="h-4 w-4 text-muted-foreground" />
|
||||||
) : (
|
) : (
|
||||||
<ChevronUp className="h-4 w-4 text-muted-foreground transition-transform duration-200" />
|
<ChevronUp className="h-4 w-4 text-muted-foreground" />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Button>
|
</Button>
|
||||||
</CollapsibleTrigger>
|
</CollapsibleTrigger>
|
||||||
|
|
||||||
<CollapsibleContent className="mt-3 data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down">
|
<CollapsibleContent className="mt-3">
|
||||||
{children}
|
{children}
|
||||||
</CollapsibleContent>
|
</CollapsibleContent>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user