|
1 | 1 | import React from 'react'; |
2 | 2 | import { |
3 | 3 | Menu, List as ListIcon, Table as TableIcon, Code, |
4 | | - Filter, RefreshCw, Shield, Plus |
| 4 | + Filter, RefreshCw, Shield, Plus, Download |
5 | 5 | } from 'lucide-react'; |
6 | 6 | import AiQueryBar from './AiQueryBar'; |
7 | 7 |
|
8 | 8 | const DatabaseHeader = ({ |
9 | 9 | project, activeCollection, dataLength, viewMode, setViewMode, |
10 | 10 | showFilterMenu, setShowFilterMenu, filtersCount, |
11 | 11 | onRefresh, onRlsClick, onAddRecord, onOpenSidebar, |
12 | | - showDeleted, setShowDeleted, onFiltersGenerated |
| 12 | + showDeleted, setShowDeleted, onFiltersGenerated, onExport, isExporting |
13 | 13 | }) => { |
14 | 14 | return ( |
15 | 15 | <header className="db-header glass-panel" style={{ |
@@ -105,6 +105,16 @@ const DatabaseHeader = ({ |
105 | 105 | </button> |
106 | 106 | )} |
107 | 107 |
|
| 108 | + |
| 109 | + {activeCollection?.name !== 'users' && ( |
| 110 | + <button onClick={onExport} disabled={isExporting} className="btn btn-secondary" style={{ padding: '6px 12px', height: '32px', gap: '6px', fontSize: '0.75rem' }}> |
| 111 | + <Download size={14} /> Export |
| 112 | + </button> |
| 113 | + |
| 114 | + )} |
| 115 | + |
| 116 | + |
| 117 | + |
108 | 118 | {activeCollection?.name !== 'users' && ( |
109 | 119 | <button onClick={onAddRecord} className="btn btn-primary" style={{ padding: '6px 12px', height: '32px', gap: '6px', fontSize: '0.75rem' }}> |
110 | 120 | <Plus size={14} /> Add Record |
|
0 commit comments