({ title, value, icon })
| 19 | }; |
| 20 | |
| 21 | const DataRow: FunctionComponent<DataRowProps> = ({ title, value, icon }) => { |
| 22 | const [hovering, setHovering] = useState(false); |
| 23 | return ( |
| 24 | <tr className="divide-solid divide-x transition dark:divide-slate-700"> |
| 25 | <td className="flex items-baseline py-2 pr-3 text-base dark:text-slate-400"> |
| 26 | <div className="flex-1 ml-1">{title}</div> |
| 27 | </td> |
| 28 | <td |
| 29 | onMouseOver={() => setHovering(true)} |
| 30 | onMouseOut={() => setHovering(false)} |
| 31 | className={`relative w-full h-full pl-2 py-2 text-base text-slate-800 transition dark:text-slate-300 break-all ${ |
| 32 | hovering ? "bg-slate-100 dark:bg-slate-700" : "bg-transparent" |
| 33 | }`} |
| 34 | > |
| 35 | {value} |
| 36 | <div |
| 37 | className={`absolute top-0 right-0 flex justify-end h-full w-full transition ${ |
| 38 | hovering ? "opacity-100" : "opacity-0" |
| 39 | }`} |
| 40 | > |
| 41 | <CopyTextButton |
| 42 | className="bg-slate-200 hover:bg-slate-300 h-fit mt-1 mr-1 px-2 py-0.5 rounded-sm transition hover:cursor-pointer dark:text-white dark:bg-slate-600 dark:hover:bg-slate-500" |
| 43 | value={value} |
| 44 | ></CopyTextButton> |
| 45 | </div> |
| 46 | </td> |
| 47 | </tr> |
| 48 | ); |
| 49 | }; |
| 50 | |
| 51 | export const DataTable: FunctionComponent<DataTableProps> = ({ rows }) => { |
| 52 | return ( |
nothing calls this directly
no outgoing calls
no test coverage detected