mirror of https://github.com/usememos/memos
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
848 B
TypeScript
32 lines
848 B
TypeScript
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
|
|
|
interface ThemeSelectorProps {
|
|
value?: string;
|
|
onValueChange: (value: string) => void;
|
|
className?: string;
|
|
}
|
|
|
|
const THEMES = [
|
|
{ value: "default", label: "Default" },
|
|
{ value: "paper", label: "Paper" },
|
|
] as const;
|
|
|
|
export const ThemeSelector = ({ value = "default", onValueChange, className }: ThemeSelectorProps) => {
|
|
return (
|
|
<Select value={value} onValueChange={onValueChange}>
|
|
<SelectTrigger className={className}>
|
|
<SelectValue />
|
|
</SelectTrigger>
|
|
<SelectContent>
|
|
{THEMES.map((theme) => (
|
|
<SelectItem key={theme.value} value={theme.value}>
|
|
{theme.label}
|
|
</SelectItem>
|
|
))}
|
|
</SelectContent>
|
|
</Select>
|
|
);
|
|
};
|
|
|
|
export default ThemeSelector;
|