Skip to content

Commit

Permalink
add simple trace grid
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico4899 committed Nov 18, 2023
1 parent 214d884 commit 24d2684
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 1 deletion.
48 changes: 48 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.16",
"@mui/material": "^5.14.17",
"@mui/x-data-grid": "^6.18.1",
"@mui/x-tree-view": "^6.17.0",
"@tauri-apps/api": "^1.5.0",
"react": "^18.2.0",
Expand Down
21 changes: 21 additions & 0 deletions src/components/TraceGrid.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { DataGrid, GridRowsProp, GridColDef } from '@mui/x-data-grid';

const rows: GridRowsProp = [
{ id: 1, col1: 'Hello', col2: 'World' },
{ id: 2, col1: 'DataGridPro', col2: 'is Awesome' },
{ id: 3, col1: 'MUI', col2: 'is Amazing' },
];

const columns: GridColDef[] = [
{ field: 'col1', headerName: 'Column 1', width: 150 },
{ field: 'col2', headerName: 'Column 2', width: 150 },
];

function TraceGrid() {
return (
<div style={{ height: 300, width: '100%' }}>
<DataGrid rows={rows} columns={columns} />
</div>
);
}
export default TraceGrid
9 changes: 8 additions & 1 deletion src/pages/DebugPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
import { TreeView } from '@mui/x-tree-view/TreeView';
import { TreeItem } from '@mui/x-tree-view/TreeItem';
import TraceGrid from "../components/TraceGrid";

function DebugPanel() {
return (<><FirstComponent/> <RandomNumber/> </>);
return (
<>
<FirstComponent/>
<RandomNumber/>
<TraceGrid />
</>
);
};

export default DebugPanel;
Expand Down

0 comments on commit 24d2684

Please sign in to comment.