capitalize editor theme display
This commit is contained in:
parent
397fa0630f
commit
c3f6f763b4
@ -14,6 +14,7 @@ import { Switch } from "./ui/switch";
|
||||
import { Label } from "./ui/label";
|
||||
import { Input } from "./ui/input";
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger } from "./ui/select";
|
||||
import { capitalize } from "../lib/utils";
|
||||
|
||||
interface Props {
|
||||
settings: Settings;
|
||||
@ -115,7 +116,7 @@ function SettingsDialog({ settings, setSettings }: Props) {
|
||||
onValueChange={(value) => handleThemeChange(value as EditorTheme)}
|
||||
>
|
||||
<SelectTrigger className="w-[180px]">
|
||||
{settings.editorTheme}
|
||||
{capitalize(settings.editorTheme)}
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="cobalt">Cobalt</SelectItem>
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
import { type ClassValue, clsx } from "clsx"
|
||||
import { twMerge } from "tailwind-merge"
|
||||
import { type ClassValue, clsx } from "clsx";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs))
|
||||
return twMerge(clsx(inputs));
|
||||
}
|
||||
|
||||
export function capitalize(str: string) {
|
||||
return str.charAt(0).toUpperCase() + str.slice(1);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user