"use client"; import { useState } from "react"; import { Download, Facebook, Twitter } from "lucide-react"; export default function DocumentSidebar() { const [selected, setSelected] = useState("4K"); const options = [ { title: "DOC", size: "296KB", file: "138 Mb", format: "mov", }, { title: "PPT", size: "296KB", file: "100 Mb", format: "mov", }, { title: "PDF", size: "296KB", file: "80 Mb", format: "mp4", }, ]; return (
{/* TAG */}
POLRI

{/* OPTIONS */}

Opsi Ukuran Document

{options.map((item) => (
setSelected(item.title)} className="cursor-pointer" >
{/* LEFT */}
{/* CUSTOM RADIO */}
{selected === item.title && (
)}

{item.title}

{/* RIGHT */}

{item.size}

))}
{/* DOWNLOAD */}
{/* SHARE */}

Bagikan:

); } /* COMPONENTS */ function Tag({ label }: { label: string }) { return ( {label} ); } function ShareIcon({ children }: { children: React.ReactNode }) { return (
{children}
); }