Skip to content

Commit 56d0f28

Browse files
Add styling for header rows
1 parent 2986564 commit 56d0f28

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

extensions/ql-vscode/src/view/common/DataGrid.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,28 @@ const StyledDataGridCell = styled.div<{
5454
${({ $gridRow }) => ($gridRow ? `grid-row: ${$gridRow};` : "")}
5555
${({ $gridColumn }) => ($gridColumn ? `grid-column: ${$gridColumn};` : "")}
5656
padding: 4px 12px;
57+
58+
&.header {
59+
font-weight: 600;
60+
}
5761
`;
5862

5963
interface DataGridCellProps {
64+
rowType?: "default" | "header";
6065
gridRow?: string | number;
6166
gridColumn?: string | number;
6267
className?: string;
6368
children: React.ReactNode;
6469
}
6570

6671
export function DataGridCell({
72+
rowType = "default",
6773
gridRow,
6874
gridColumn,
6975
className,
7076
children,
7177
}: DataGridCellProps) {
78+
className = `${className || ""} ${rowType}`;
7279
return (
7380
<StyledDataGridCell
7481
$gridRow={gridRow}

extensions/ql-vscode/src/view/model-editor/ModeledMethodDataGrid.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ export const ModeledMethodDataGrid = ({
7171
<DataGrid gridTemplateColumns={gridTemplateColumns}>
7272
{someMethodsAreVisible && (
7373
<>
74-
<DataGridCell>API or method</DataGridCell>
75-
<DataGridCell>Model type</DataGridCell>
76-
<DataGridCell>Input</DataGridCell>
77-
<DataGridCell>Output</DataGridCell>
78-
<DataGridCell>Kind</DataGridCell>
74+
<DataGridCell rowType="header">API or method</DataGridCell>
75+
<DataGridCell rowType="header">Model type</DataGridCell>
76+
<DataGridCell rowType="header">Input</DataGridCell>
77+
<DataGridCell rowType="header">Output</DataGridCell>
78+
<DataGridCell rowType="header">Kind</DataGridCell>
7979
{viewState.showMultipleModels && (
80-
<DataGridCell>
80+
<DataGridCell rowType="header">
8181
<ScreenReaderOnly>Add or remove models</ScreenReaderOnly>
8282
</DataGridCell>
8383
)}

0 commit comments

Comments
 (0)