Skip to content

Commit

Permalink
improve voting history table
Browse files Browse the repository at this point in the history
  • Loading branch information
justinschreiner committed Nov 26, 2024
1 parent fe05fe1 commit 53404f7
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions src/components/representatives/votingHistoryTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,44 @@ export function VotingHistoryTable(props: Props): JSX.Element {
const theme = useTheme();

const columns: GridColDef[] = [
{ field: 'id', headerName: '#' },
{
field: 'id',
headerName: '#',
disableColumnMenu: true,
renderHeader: (): JSX.Element => {
return (
<Typography variant="h5" fontWeight="600">
Poll #
</Typography>
);
},
renderCell: (params): JSX.Element => {
return <Typography>{params.row.id}</Typography>;
},
},
{
field: 'name',
headerName: 'Name',
minWidth: 150,
flex: 1,
disableColumnMenu: true,
renderHeader: (): JSX.Element => {
return (
<Typography variant="h5" fontWeight="600">
Name
Poll Name
</Typography>
);
},
renderCell: (params): JSX.Element => {
return <Typography>{params.row.name}</Typography>;
},
},
{
field: 'user_vote',
headerName: 'User Vote',
minWidth: 150,
flex: 1,
disableColumnMenu: true,
renderHeader: (): JSX.Element => {
return (
<Typography variant="h5" fontWeight="600">
Expand Down Expand Up @@ -118,12 +137,16 @@ export function VotingHistoryTable(props: Props): JSX.Element {
'.MuiDataGrid-columnHeader': {
fontFamily: 'Montserrat',
fontSize: '1.2rem',
backgroundColor: 'rbga(0,0,0,0)',
},
'.MuiDataGrid-cell': {
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
},
'.MuiDataGrid-filler': {
backgroundColor: 'rbga(0,0,0,0)',
},
borderRadius: `${theme.shape.borderRadius}px`,
}}
/>
Expand Down

0 comments on commit 53404f7

Please sign in to comment.