Skip to content

Open source CapCut alternative.

TypeScript

refactor(site): extract a shared SectionTitle for Cut config sections

David Lec53ffcecf5d5
diff --git a/site/src/cut/components/SectionTitle.tsx b/site/src/cut/components/SectionTitle.tsx
new file mode 100644
index 00000000..acff017a
--- /dev/null
+++ b/site/src/cut/components/SectionTitle.tsx
@@ -0,0 +1,7 @@
+import type { ReactNode } from "react";
+import { cn } from "@/lib/utils";
+
+/** Heading for a settings/config section — the one look used everywhere in Cut. */
+export function SectionTitle({ children, className }: { children: ReactNode; className?: string }) {
+ return <div className={cn("text-xs font-semibold text-muted-foreground", className)}>{children}</div>;
+}
diff --git a/site/src/cut/components/VoicePicker.tsx b/site/src/cut/components/VoicePicker.tsx
index a71935e2..c5007633 100644
--- a/site/src/cut/components/VoicePicker.tsx
+++ b/site/src/cut/components/VoicePicker.tsx
@@ -3,6 +3,7 @@
import { useEffect, useRef, useState, useSyncExternalStore } from "react";
import { Captions, ChevronDown, Languages, Loader2, Pause, Play } from "lucide-react";
import { Button } from "@/components/ui/button";
+import { SectionTitle } from "@/cut/components/SectionTitle";
import { creditsUrl, signInUrl, useSignedIn } from "@/cut/lib/generate";
import { useEditor } from "@/cut/lib/store";
import {
@@ -123,9 +124,7 @@ export function VoicePicker({
return (
<div className="voice-picker flex flex-col gap-1.5">
- <span className="text-[11px] font-semibold tracking-wider text-muted-foreground uppercase">
- {title}
- </span>
+ <SectionTitle>{title}</SectionTitle>
<div className="flex items-center gap-2">
<button
type="button"