-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(deps): bump @mui/x-data-grid from 7.20.0 to 7.24.0 (#697)
* build(deps): bump @mui/x-data-grid from 7.20.0 to 7.24.0 Bumps [@mui/x-data-grid](https://github.com/mui/mui-x/tree/HEAD/packages/x-data-grid) from 7.20.0 to 7.24.0. - [Release notes](https://github.com/mui/mui-x/releases) - [Changelog](https://github.com/mui/mui-x/blob/v7.24.0/CHANGELOG.md) - [Commits](https://github.com/mui/mui-x/commits/v7.24.0/packages/x-data-grid) --- updated-dependencies: - dependency-name: "@mui/x-data-grid" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * update snapshot --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: George Adams <[email protected]>
- Loading branch information
1 parent
61a3b1f
commit 05f906b
Showing
5 changed files
with
83 additions
and
57 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from "react"; | ||
|
||
const CustomTable = ({ children }) => { | ||
// Find the thead and tbody from children | ||
const thead = children.find(child => child.type === 'thead'); | ||
const tbody = children.find(child => child.type === 'tbody'); | ||
|
||
// Extract headers from thead | ||
const headers = thead ? thead.props.children.props.children : []; | ||
// Extract rows from tbody | ||
const rows = tbody ? tbody.props.children : []; | ||
|
||
return ( | ||
<div className="py-8 md:py-16 not-prose max-w-6xl w-full"> | ||
<div className="overflow-x-auto bg-[#200D46] p-4 md:p-8 rounded-3xl"> | ||
{/* Render the table headers */} | ||
<div className="min-w-full flex items-center justify-start pb-6 w-full border-b border-[#3E3355] px-3"> | ||
{headers.map((header, index) => ( | ||
<h3 key={index} className="text-lg leading-[140%] text-lightgrey font-semibold min-w-[210px] lg:min-w-[230px]"> | ||
{header.props.children} | ||
</h3> | ||
))} | ||
</div> | ||
{/* Render the table rows */} | ||
{rows.map((row, rowIndex) => ( | ||
<div key={rowIndex} className={`flex items-center justify-start min-w-[1030px] lg:min-w-[1134px] px-3 py-6 rounded-3xl ${rowIndex % 2 !== 0 ? "bg-[#2B194F]" : "bg-transparent"}`}> | ||
{row.props.children.map((cell, cellIndex) => ( | ||
<h3 key={cellIndex} className="tab-button-text text-white min-w-[210px] lg:min-w-[230px]"> | ||
{cell.props.children} | ||
</h3> | ||
))} | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CustomTable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters