Files
breakpilot-lehrer/studio-v2/app/messages/_components/TemplatesDropdown.tsx
Benjamin Admin 0b37c5e692 [split-required] Split website + studio-v2 monoliths (Phase 3 continued)
Website (14 monoliths split):
- compliance/page.tsx (1,519 → 9), docs/audit (1,262 → 20)
- quality (1,231 → 16), alerts (1,203 → 10), docs (1,202 → 11)
- i18n.ts (1,173 → 8 language files)
- unity-bridge (1,094 → 12), backlog (1,087 → 6)
- training (1,066 → 8), rag (1,063 → 8)
- Deleted index_original.ts (4,899 LOC dead backup)

Studio-v2 (5 monoliths split):
- meet/page.tsx (1,481 → 9), messages (1,166 → 9)
- AlertsB2BContext.tsx (1,165 → 5 modules)
- alerts-b2b/page.tsx (1,019 → 6), korrektur/archiv (1,001 → 6)

All existing imports preserved. Zero new TypeScript errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-24 17:52:36 +02:00

44 lines
1.5 KiB
TypeScript

'use client'
interface TemplatesDropdownProps {
templates: { id: string; name: string; content: string }[]
onSelect: (content: string) => void
isDark: boolean
}
export function TemplatesDropdown({ templates, onSelect, isDark }: TemplatesDropdownProps) {
return (
<div className={`absolute bottom-full left-0 mb-2 w-64 rounded-2xl border shadow-2xl overflow-hidden z-50 ${
isDark
? 'bg-slate-900 border-white/20'
: 'bg-white border-slate-200'
}`}>
<div className={`p-3 border-b ${isDark ? 'border-white/10' : 'border-slate-100'}`}>
<span className={`text-sm font-medium ${isDark ? 'text-white' : 'text-slate-900'}`}>
Vorlagen
</span>
</div>
<div className="max-h-64 overflow-y-auto">
{templates.map(tpl => (
<button
key={tpl.id}
onClick={() => onSelect(tpl.content)}
className={`w-full text-left p-3 transition-colors ${
isDark
? 'hover:bg-white/5 border-b border-white/5'
: 'hover:bg-slate-50 border-b border-slate-100'
}`}
>
<span className={`text-sm font-medium block ${isDark ? 'text-white' : 'text-slate-900'}`}>
{tpl.name}
</span>
<span className={`text-xs line-clamp-2 ${isDark ? 'text-white/50' : 'text-slate-500'}`}>
{tpl.content}
</span>
</button>
))}
</div>
</div>
)
}