-
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.
Merge pull request #365 from shreyas1434shinde/centerSession
Issue #PS-1344 fix: Center Sessions UI Implementation
- Loading branch information
Showing
11 changed files
with
326 additions
and
21 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,49 @@ | ||
import { Box, Typography } from '@mui/material'; | ||
import { Session, SessionsCardProps } from '@/utils/Interfaces'; | ||
|
||
import EditOutlined from '@mui/icons-material/EditOutlined'; | ||
import React from 'react'; | ||
import { useTheme } from '@mui/material/styles'; | ||
|
||
const SessionsCard: React.FC<SessionsCardProps> = ({ data, children }) => { | ||
const theme = useTheme<any>(); | ||
return ( | ||
<Box | ||
sx={{ | ||
border: `1px solid ${theme.palette.warning['A100']}`, | ||
borderRadius: '8px', | ||
marginBottom: '16px', | ||
}} | ||
> | ||
<Box | ||
sx={{ | ||
display: 'flex', | ||
justifyContent: 'space-between', | ||
padding: '8px 16px', | ||
}} | ||
> | ||
<Box> | ||
<Typography | ||
color={theme.palette.warning['300']} | ||
fontWeight={'400'} | ||
textAlign={'left'} | ||
fontSize={'16px'} | ||
> | ||
{data?.subject} | ||
</Typography> | ||
|
||
<Typography fontWeight={'400'} textAlign={'left'} fontSize={'14px'}> | ||
{data?.time} | ||
</Typography> | ||
<Typography fontWeight={'400'} textAlign={'left'} fontSize={'14px'}> | ||
{data?.teacherName} | ||
</Typography> | ||
</Box> | ||
<EditOutlined /> | ||
</Box> | ||
<Box>{children}</Box> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default SessionsCard; |
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,96 @@ | ||
import Accordion from '@mui/material/Accordion'; | ||
import AccordionDetails from '@mui/material/AccordionDetails'; | ||
import AccordionSummary from '@mui/material/AccordionSummary'; | ||
import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; | ||
import Box from '@mui/material/Box'; | ||
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; | ||
import MenuBookIcon from '@mui/icons-material/MenuBook'; | ||
import PriorityHighIcon from '@mui/icons-material/PriorityHigh'; | ||
import React from 'react'; | ||
import { SessionCardFooterProps } from '../utils/Interfaces'; | ||
import SubdirectoryArrowRightIcon from '@mui/icons-material/SubdirectoryArrowRight'; | ||
import Typography from '@mui/material/Typography'; | ||
import { useTheme } from '@mui/material/styles'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
const SessionCardFooter: React.FC<SessionCardFooterProps> = ({ item }) => { | ||
const theme = useTheme(); | ||
const { t } = useTranslation(); | ||
|
||
return item?.topic ? ( | ||
<Box | ||
sx={{ | ||
background: theme.palette.background.default, | ||
padding: '4px 16px', | ||
borderRadius: '8px', | ||
}} | ||
> | ||
<Accordion | ||
defaultExpanded | ||
sx={{ | ||
boxShadow: 'none', | ||
border: 'none', | ||
background: 'none', | ||
}} | ||
> | ||
<AccordionSummary | ||
expandIcon={<ExpandMoreIcon />} | ||
aria-controls="panel1-content" | ||
id="panel1-header" | ||
className="accordion-summary" | ||
sx={{ px: 0, m: 0 }} | ||
> | ||
<Typography fontWeight="500" fontSize="14px" className="text-7C"> | ||
{t('COMMON.TO_BE_TAUGHT')} | ||
</Typography> | ||
</AccordionSummary> | ||
<AccordionDetails sx={{ padding: '0px' }}> | ||
<Box sx={{ display: 'flex', gap: '10px' }}> | ||
<MenuBookIcon /> | ||
<Typography color={theme.palette.secondary.main} variant="h5"> | ||
{item?.topic} | ||
</Typography> | ||
</Box> | ||
<Box | ||
sx={{ | ||
display: 'flex', | ||
gap: '10px', | ||
marginTop: '5px', | ||
marginLeft: '10px', | ||
}} | ||
> | ||
<SubdirectoryArrowRightIcon /> | ||
<Typography color={theme.palette.secondary.main} variant="h5"> | ||
{item?.subtopic} | ||
</Typography> | ||
</Box> | ||
</AccordionDetails> | ||
</Accordion> | ||
</Box> | ||
) : ( | ||
<Box | ||
sx={{ | ||
display: 'flex', | ||
justifyContent: 'space-between', | ||
background: theme.palette.background.default, | ||
padding: '8px 16px', | ||
borderRadius: '8px', | ||
}} | ||
> | ||
<Box sx={{ display: 'flex', alignItems: 'center' }}> | ||
<PriorityHighIcon sx={{ color: theme.palette.error.main }} /> | ||
<Box | ||
fontSize={'14px'} | ||
fontWeight={500} | ||
color={theme.palette.secondary.main} | ||
ml={1} | ||
> | ||
{t('COMMON.SELECT_TOPIC')} | ||
</Box> | ||
</Box> | ||
<ArrowForwardIcon /> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default SessionCardFooter; |
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
Empty file.
Oops, something went wrong.