mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-09-30 03:23:16 +00:00
feat(web): add invoice grid lines and bold headers (AP-44) (#15)
* feat(web): fix shell chrome, logo home, and live nav badges Refs: AP-42 * feat(web): add invoice grid lines and bold headers Refs: AP-44 * feat(web): support auto row height for multi-line invoice cells Refs: AP-44
This commit is contained in:
parent
e507a6d48b
commit
3ac40de291
1 changed files with 30 additions and 5 deletions
|
|
@ -6,6 +6,8 @@ type MockDataGridProps<R extends GridValidRowModel> = DataGridProps<R> & {
|
|||
|
||||
export function MockDataGrid<R extends GridValidRowModel>({
|
||||
"data-testid": testId,
|
||||
sx,
|
||||
getRowHeight,
|
||||
...props
|
||||
}: MockDataGridProps<R>) {
|
||||
return (
|
||||
|
|
@ -19,11 +21,34 @@ export function MockDataGrid<R extends GridValidRowModel>({
|
|||
pagination: { paginationModel: { pageSize: 10, page: 0 } },
|
||||
}}
|
||||
getRowId={(row) => row.id as string}
|
||||
sx={{
|
||||
border: 1,
|
||||
borderColor: "divider",
|
||||
backgroundColor: "background.paper",
|
||||
}}
|
||||
getRowHeight={getRowHeight ?? (() => "auto")}
|
||||
sx={[
|
||||
{
|
||||
border: 1,
|
||||
borderColor: "divider",
|
||||
backgroundColor: "background.paper",
|
||||
"& .MuiDataGrid-columnHeaderTitle": {
|
||||
fontWeight: 700,
|
||||
},
|
||||
"& .MuiDataGrid-cell": {
|
||||
borderBottom: "1px solid",
|
||||
borderColor: "divider",
|
||||
py: 1,
|
||||
alignItems: "flex-start",
|
||||
display: "flex",
|
||||
},
|
||||
"& .MuiDataGrid-cellContent": {
|
||||
whiteSpace: "normal",
|
||||
wordBreak: "break-word",
|
||||
lineHeight: 1.35,
|
||||
width: "100%",
|
||||
},
|
||||
"& .MuiDataGrid-row:last-of-type .MuiDataGrid-cell": {
|
||||
borderBottom: "none",
|
||||
},
|
||||
},
|
||||
...(Array.isArray(sx) ? sx : sx ? [sx] : []),
|
||||
]}
|
||||
{...props}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue