Files
resolutionflow/frontend/src/components/library/SortDropdown.tsx
chihlasm f4ce1595d6 feat: implement monochrome design system across entire frontend
Migrate all 84 frontend files from the old themed/colored design to a
monochrome glass-morphism design system. Pure black backgrounds, white
text with opacity levels, glass-card components with backdrop-blur, and
functional color reserved for status indicators only.

Foundation: remap CSS variables to monochrome, simplify Tailwind config,
remove theme toggle, convert brand logo/wordmark to white. Pages: all
14 pages updated. Components: all common, library, session, step-library,
tree-editor, tree-preview, admin, and subscription components converted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 21:41:29 -05:00

45 lines
1.5 KiB
TypeScript

import { ArrowUpDown } from 'lucide-react'
import { cn } from '@/lib/utils'
type SortBy = 'usage_count' | 'updated_at' | 'created_at' | 'name' | 'name_desc' | 'version'
interface SortDropdownProps {
value: SortBy
onChange: (sortBy: SortBy) => void
className?: string
}
const sortOptions: { value: SortBy; label: string }[] = [
{ value: 'usage_count', label: 'Most Used' },
{ value: 'updated_at', label: 'Recently Updated' },
{ value: 'created_at', label: 'Recently Created' },
{ value: 'name', label: 'Name (A-Z)' },
{ value: 'name_desc', label: 'Name (Z-A)' },
{ value: 'version', label: 'Version Number' },
]
export function SortDropdown({ value, onChange, className }: SortDropdownProps) {
return (
<div className={cn('relative inline-flex items-center', className)}>
<span className="mr-2 flex items-center gap-1.5 text-sm text-white/40">
<ArrowUpDown className="h-4 w-4" />
<span className="hidden sm:inline">Sort:</span>
</span>
<select
value={value}
onChange={(e) => onChange(e.target.value as SortBy)}
className={cn(
'rounded-md border border-white/10 bg-black/50 px-3 py-1.5 text-sm',
'text-white focus:border-white/30 focus:outline-none focus:ring-1 focus:ring-white/20'
)}
>
{sortOptions.map((option) => (
<option key={option.value} value={option.value}>
{option.label}
</option>
))}
</select>
</div>
)
}