Add ApplicantListItem component to display applicant information in a… - #205
Add ApplicantListItem component to display applicant information in a…#205smohyud4 wants to merge 2 commits into
Conversation
zaviermiller
left a comment
There was a problem hiding this comment.
looking good! few quick fixes
| size="small" | ||
| > | ||
| View Application | ||
| <LaunchIcon /> |
There was a problem hiding this comment.
use the buttons endIcon prop for this icon (check docs)
| import Button from '@mui/material/Button'; | ||
|
|
||
| //Each row should display the applicant name (first and last), status, NetID and application | ||
| export default function ApplicantListItem(applicant: ApplicantResponse) { |
There was a problem hiding this comment.
instead of making the response type the prop type do
interface ApplicantListItemProps {
applicant: ApplicantResponse
}
export default function ApplicantListItem({ applicant }: ApplicantListItemResponse) {
...
}This lets you render the applicant list item by doing:
<ApplicantListItem applicant={applicant} />Instead of having to pass each field as a different prop.
| export default function ApplicantListItem(applicant: ApplicantResponse) { | ||
| return ( | ||
| <TableRow> | ||
| <TableCell align={'left'} style={{ top: 57, minWidth: 170 }}> |
There was a problem hiding this comment.
remove the style from each of these. I see what you're doing and why, but we can define the table component as `<Table sx={{ tableLayout: 'fixed' }}>...
| <TableCell align={'left'} style={{ top: 57, minWidth: 170 }}> | ||
| <Button | ||
| variant="outlined" | ||
| style={{ color: 'black', borderColor: 'black' }} |
There was a problem hiding this comment.
remove the style from this. you can just set the color prop to inherit
There was a problem hiding this comment.
I forgot about the props stuff, but I knew something was up with the styling. I couldn't get the button color to be black but did not want to mess with palette customization guide. So I just overrode it haha.
…arameter access and fixed styling
Description
This adds an ApplicantListItem component to be displayed on the applicants page. It contains the full name, status, netid, and application of each application. The "View Application" button currently does not have functionality.
Relevant issue(s)
#146
Questions
Type of change
Testing
Checklist: