Skip to content

Commit

Permalink
Merge pull request #2992 from github/robertbrignull/columnCount
Browse files Browse the repository at this point in the history
Add $ to columnCount prop used by styled component
  • Loading branch information
robertbrignull authored Oct 18, 2023
2 parents 8a1da31 + f886cd0 commit ec0e74b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { RawResultRow } from "./RawResultRow";
const numOfResultsInContractedMode = 5;

type TableContainerProps = {
columnCount: number;
$columnCount: number;
};

const TableContainer = styled.div<TableContainerProps>`
Expand All @@ -18,7 +18,7 @@ const TableContainer = styled.div<TableContainerProps>`
// minimum width of 1fr is auto, not 0.
// https://css-tricks.com/equal-width-columns-in-css-grid-are-kinda-weird/
grid-template-columns: repeat(
${(props) => props.columnCount},
${(props) => props.$columnCount},
minmax(0, 1fr)
);
max-width: 45rem;
Expand Down Expand Up @@ -51,7 +51,7 @@ const RawResultsTable = ({

return (
<>
<TableContainer columnCount={schema.columns.length}>
<TableContainer $columnCount={schema.columns.length}>
{results.rows.slice(0, numOfResultsToShow).map((row, rowIndex) => (
<RawResultRow
key={rowIndex}
Expand Down

0 comments on commit ec0e74b

Please sign in to comment.