-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #PS-657 fix:ALL screen UI matach with figma
- Loading branch information
1 parent
8448cee
commit 8577ca1
Showing
13 changed files
with
571 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { Box, Grid, Stack, Typography } from '@mui/material'; | ||
|
||
import { CohortAttendanceListViewProps } from '@/utils/Interfaces'; | ||
import React from 'react'; | ||
import { useTheme } from '@mui/material/styles'; | ||
import { useTranslation } from 'next-i18next'; | ||
import { lowLearnerAttendanceLimit } from '../../app.config'; | ||
|
||
const CohortAttendanceListView: React.FC<CohortAttendanceListViewProps> = ({ | ||
cohortName, | ||
attendancePercent, | ||
}) => { | ||
const { t } = useTranslation(); | ||
const theme = useTheme<any>(); | ||
const textColor = attendancePercent > lowLearnerAttendanceLimit ? theme.palette.success.main : theme.palette.error.main; | ||
|
||
return ( | ||
<Stack> | ||
<Box | ||
borderBottom={`1px solid ${theme.palette.warning['A100']}`} | ||
margin="0" | ||
alignItems={'center'} | ||
|
||
bgcolor={theme.palette.warning['A400']} | ||
maxHeight={'auto'} | ||
> | ||
<Grid | ||
container | ||
alignItems="center" | ||
textAlign={'center'} | ||
justifyContent="space-between" | ||
p={'5px'} | ||
> | ||
<Grid item xs={9}> | ||
<Typography | ||
textAlign={'left'} | ||
sx={{ fontSize: '0.875rem', fontWeight: '400', color: theme.palette.warning['300'] }} | ||
> | ||
{cohortName} | ||
</Typography> | ||
</Grid> | ||
<Grid item xs={3}> | ||
<Typography sx={{ fontSize: '1rem', fontWeight: '500', color: textColor }}> | ||
{attendancePercent}% | ||
</Typography> | ||
</Grid> | ||
</Grid> | ||
</Box> | ||
</Stack> | ||
); | ||
}; | ||
|
||
export default CohortAttendanceListView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.