import { FunctionComponent, useState } from "react"; import { CopyTextButton } from "./CopyTextButton"; import { Title } from "./Primitives/Title"; export type DataTableProps = { rows: DataTableRow[]; }; export type DataTableRow = { key: string; value: string; icon?: JSX.Element; }; type DataRowProps = { title: string; value: string; icon?: JSX.Element; }; const DataRow: FunctionComponent = ({ title, value, icon }) => { const [hovering, setHovering] = useState(false); return (
{title}
setHovering(true)} onMouseOut={() => setHovering(false)} className={`relative w-full h-full pl-2 py-2 text-base text-slate-800 transition dark:text-slate-300 break-all ${ hovering ? "bg-slate-100 dark:bg-slate-700" : "bg-transparent" }`} > {value}
); }; export const DataTable: FunctionComponent = ({ rows }) => { return (
Properties {rows.map((row) => { return ( ); })}
); };