mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-16 20:11:08 +00:00
Unify theme item style across ThemeSelectPanel (host details) and ThemeSelectModal (settings) with a shared ThemeList component featuring compact swatch previews, dark/light/custom grouping, and no-rounded selection highlight. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
49 lines
1.2 KiB
TypeScript
49 lines
1.2 KiB
TypeScript
import React from 'react';
|
|
import {
|
|
AsidePanel,
|
|
AsidePanelContent,
|
|
} from './ui/aside-panel';
|
|
import { ScrollArea } from './ui/scroll-area';
|
|
import { ThemeList } from './ThemeList';
|
|
|
|
interface ThemeSelectPanelProps {
|
|
open: boolean;
|
|
selectedThemeId?: string;
|
|
onSelect: (themeId: string) => void;
|
|
onClose: () => void;
|
|
onBack?: () => void;
|
|
showBackButton?: boolean;
|
|
}
|
|
|
|
const ThemeSelectPanel: React.FC<ThemeSelectPanelProps> = ({
|
|
open,
|
|
selectedThemeId,
|
|
onSelect,
|
|
onClose,
|
|
onBack,
|
|
showBackButton = true,
|
|
}) => {
|
|
return (
|
|
<AsidePanel
|
|
open={open}
|
|
onClose={onClose}
|
|
title="Select Color Theme"
|
|
showBackButton={showBackButton}
|
|
onBack={onBack}
|
|
>
|
|
<AsidePanelContent className="p-0">
|
|
<ScrollArea className="h-full">
|
|
<div className="py-2">
|
|
<ThemeList
|
|
selectedThemeId={selectedThemeId || ''}
|
|
onSelect={onSelect}
|
|
/>
|
|
</div>
|
|
</ScrollArea>
|
|
</AsidePanelContent>
|
|
</AsidePanel>
|
|
);
|
|
};
|
|
|
|
export default ThemeSelectPanel;
|