Spaces:
Sleeping
Sleeping
Download frontend/src/components/ViewModeToggle.tsx from vn6295337/Instant-SWOT-Agent: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/spaces/vn6295337/Instant-SWOT-Agent/resolve/main/frontend/src/components/ViewModeToggle.tsx
- Command line
-
hf download hf://spaces/vn6295337/Instant-SWOT-Agent/frontend/src/components/ViewModeToggle.tsx
-
curl -L -o ViewModeToggle.tsx https://huggingface.co/spaces/vn6295337/Instant-SWOT-Agent/resolve/main/frontend/src/components/ViewModeToggle.tsx
1.15 kB
| import { cn } from "@/lib/utils" | |
| export type ViewMode = 'executive' | 'full' | |
| interface ViewModeToggleProps { | |
| value: ViewMode | |
| onChange: (mode: ViewMode) => void | |
| className?: string | |
| } | |
| export function ViewModeToggle({ value, onChange, className }: ViewModeToggleProps) { | |
| return ( | |
| <div className={cn( | |
| "inline-flex items-center rounded-lg bg-gray-800 p-1 text-sm", | |
| className | |
| )}> | |
| <button | |
| onClick={() => onChange('executive')} | |
| className={cn( | |
| "px-3 py-1.5 rounded-md transition-all duration-200 font-medium", | |
| value === 'executive' | |
| ? "bg-primary text-primary-foreground shadow-sm" | |
| : "text-gray-400 hover:text-gray-200" | |
| )} | |
| > | |
| Executive | |
| </button> | |
| <button | |
| onClick={() => onChange('full')} | |
| className={cn( | |
| "px-3 py-1.5 rounded-md transition-all duration-200 font-medium", | |
| value === 'full' | |
| ? "bg-primary text-primary-foreground shadow-sm" | |
| : "text-gray-400 hover:text-gray-200" | |
| )} | |
| > | |
| Full | |
| </button> | |
| </div> | |
| ) | |
| } | |
| export default ViewModeToggle | |