fix(databases): move table metadata to the bottom of the table viewer

This commit is contained in:
2026-06-14 14:17:56 -07:00
parent 103ad8c81f
commit 606af52b8e

View File

@@ -106,14 +106,6 @@ export function TableViewer({ projectId, dbUuid, schema, table }: Props) {
return ( return (
<div style={wrap}> <div style={wrap}>
<div style={meta}>
Showing {data.rows.length} row{data.rows.length === 1 ? "" : "s"}
{data.truncated && " (truncated to first 50)"} · {data.columns.length}{" "}
column{data.columns.length === 1 ? "" : "s"} ·{" "}
<code style={qual}>
{schema}.{table}
</code>
</div>
<div style={tableScroll}> <div style={tableScroll}>
<table style={tableEl}> <table style={tableEl}>
<thead> <thead>
@@ -138,6 +130,14 @@ export function TableViewer({ projectId, dbUuid, schema, table }: Props) {
</tbody> </tbody>
</table> </table>
</div> </div>
<div style={meta}>
Showing {data.rows.length} row{data.rows.length === 1 ? "" : "s"}
{data.truncated && " (truncated to first 50)"} · {data.columns.length}{" "}
column{data.columns.length === 1 ? "" : "s"} ·{" "}
<code style={qual}>
{schema}.{table}
</code>
</div>
</div> </div>
); );
} }
@@ -160,8 +160,11 @@ const wrap: React.CSSProperties = {
flex: 1, flex: 1,
}; };
const meta: React.CSSProperties = { const meta: React.CSSProperties = {
fontSize: "0.74rem", fontSize: "0.75rem",
color: INK.mid, color: INK.mid,
display: "flex",
justifyContent: "space-between",
padding: "4px 8px",
}; };
const qual: React.CSSProperties = { const qual: React.CSSProperties = {
fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace", fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",