capitalize editor theme display

This commit is contained in:
Abi Raja 2023-11-28 09:49:30 -05:00
parent 397fa0630f
commit c3f6f763b4
2 changed files with 10 additions and 5 deletions

View File

@ -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>

View File

@ -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);
}