전체적인 스타일 수정
This commit is contained in:
@@ -220,15 +220,15 @@ export const SqlQueryModal: React.FC<SqlQueryModalProps> = ({ isOpen, onClose, c
|
||||
</div>
|
||||
|
||||
{/* 테이블 정보 */}
|
||||
<div className="bg-muted/50 rounded-md border p-4 space-y-4">
|
||||
<div className="rounded-md border bg-muted/50 p-4 space-y-4">
|
||||
<div>
|
||||
<h3 className="mb-2 font-medium">사용 가능한 테이블</h3>
|
||||
<h3 className="mb-2 font-medium text-sm">사용 가능한 테이블</h3>
|
||||
<div className="max-h-[200px] overflow-y-auto">
|
||||
<div className="pr-2 space-y-2">
|
||||
<div className="space-y-2 pr-2">
|
||||
{tables.map((table) => (
|
||||
<div key={table.table_name} className="bg-white rounded-lg shadow-sm border p-3">
|
||||
<div key={table.table_name} className="rounded-lg border bg-card p-3 shadow-sm">
|
||||
<div className="flex items-center justify-between">
|
||||
<h4 className="font-mono font-bold">{table.table_name}</h4>
|
||||
<h4 className="font-mono font-bold text-sm">{table.table_name}</h4>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
@@ -237,12 +237,13 @@ export const SqlQueryModal: React.FC<SqlQueryModalProps> = ({ isOpen, onClose, c
|
||||
loadTableColumns(table.table_name);
|
||||
setQuery(`SELECT * FROM ${table.table_name}`);
|
||||
}}
|
||||
className="h-8 text-xs"
|
||||
>
|
||||
선택
|
||||
</Button>
|
||||
</div>
|
||||
{table.description && (
|
||||
<p className="text-muted-foreground mt-1 text-sm">{table.description}</p>
|
||||
<p className="mt-1 text-sm text-muted-foreground">{table.description}</p>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
@@ -253,12 +254,12 @@ export const SqlQueryModal: React.FC<SqlQueryModalProps> = ({ isOpen, onClose, c
|
||||
{/* 선택된 테이블의 컬럼 정보 */}
|
||||
{selectedTable && (
|
||||
<div>
|
||||
<h3 className="mb-2 font-medium">테이블 컬럼 정보: {selectedTable}</h3>
|
||||
<h3 className="mb-2 font-medium text-sm">테이블 컬럼 정보: {selectedTable}</h3>
|
||||
{loadingColumns ? (
|
||||
<div className="text-sm text-muted-foreground">컬럼 정보 로딩 중...</div>
|
||||
) : selectedTableColumns.length > 0 ? (
|
||||
<div className="max-h-[200px] overflow-y-auto">
|
||||
<div className="bg-white rounded-lg shadow-sm border">
|
||||
<div className="rounded-lg border bg-card shadow-sm">
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
@@ -315,20 +316,20 @@ export const SqlQueryModal: React.FC<SqlQueryModalProps> = ({ isOpen, onClose, c
|
||||
{/* 결과 섹션 */}
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="text-muted-foreground text-sm">
|
||||
<div className="text-sm text-muted-foreground">
|
||||
{loading ? "쿼리 실행 중..." : results.length > 0 ? `${results.length}개의 결과가 있습니다.` : "실행된 쿼리가 없습니다."}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 결과 그리드 */}
|
||||
<div className="rounded-md border">
|
||||
<div className="rounded-md border bg-card">
|
||||
<div className="max-h-[300px] overflow-y-auto">
|
||||
<div className="min-w-full inline-block align-middle">
|
||||
<div className="inline-block min-w-full align-middle">
|
||||
<div className="overflow-x-auto">
|
||||
<Table>
|
||||
{results.length > 0 ? (
|
||||
<>
|
||||
<TableHeader className="sticky top-0 bg-white z-10">
|
||||
<TableHeader className="sticky top-0 z-10 bg-card">
|
||||
<TableRow>
|
||||
{Object.keys(results[0]).map((key) => (
|
||||
<TableHead key={key} className="font-mono font-bold">
|
||||
|
||||
Reference in New Issue
Block a user