Skip to content

Commit

Permalink
Merge pull request #19 from nemac/mobile-fixes
Browse files Browse the repository at this point in the history
Mobile fixes
  • Loading branch information
levy22d authored Dec 13, 2024
2 parents 7bf0271 + cbed114 commit 3153437
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 26 deletions.
16 changes: 11 additions & 5 deletions src/components/ComparisonBoard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ export default function ComparisonBoard({
<SetHoverRowContext.Provider value={setHoverRow}>
<Container
maxWidth="xl"
sx={{ p: 2 }}
sx={{ p: 0 }}
>
<Stack
direction="row"
gap={1}
sx={{ bgcolor: theme.palette.primary.lightGray }}
sx={{ bgcolor: theme.palette.primary.lightGray, gap: { xs: 0, md: 1 }}}
>
{/* Community Panel */}
<Box
Expand Down Expand Up @@ -76,7 +75,11 @@ export default function ComparisonBoard({
<Box
sx={{
position: 'absolute',
top: '8px',
top: {
xs: '70px',
sm: '40px',
lg: '8px',
},
right: '8px',
}}
>
Expand Down Expand Up @@ -109,7 +112,10 @@ export default function ComparisonBoard({
sx={{
pb: 2,
width: '100%',
gap: 1,
gap: {
xs: '4px',
md: 1,
},
overflowX: 'auto',
}}
>
Expand Down
5 changes: 2 additions & 3 deletions src/components/DropDownSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ const DropDownSelector = ({ availableSelections, selections, setSelections, opti
startIcon={<PlusIcon>+</PlusIcon>}
sx={{ width: '100%' }}
>
<Typography sx={{ display: { xs: 'none', md: 'inherit' }, fontSize: '.875rem' }}>Add another&nbsp;</Typography>
<Typography sx={{ display: { xs: 'inherit', md: 'none' }, fontSize: '.875rem' }}>Add&nbsp;</Typography>
<Typography sx={{ fontSize: '.875rem' }}>{trimmedOption.toLowerCase()}</Typography>
<Typography sx={{ display: { xs: 'none', md: 'inherit' }, fontSize: '.875rem', whiteSpace: 'nowrap', }}>Add another {trimmedOption.toLowerCase()}</Typography>
<Typography sx={{ display: { xs: 'inherit', md: 'none' }, fontSize: '.875rem', whiteSpace: 'nowrap', }}>Add another</Typography>
</AddButton>

<StyledMenu
Expand Down
20 changes: 4 additions & 16 deletions src/components/PractitionerPane.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function StrTrainedBadge({ isTrained }) {
alignItems: 'center',
}}
>
<SchoolIcon sx={{ fontSize: '1rem', mr: 0.5 }} />
<SchoolIcon sx={{ fontSize: {xs: 'inherit', md: '1rem'}, mr: 0.5 }} />
<Typography
sx={{
display: {
Expand Down Expand Up @@ -107,21 +107,9 @@ function PractitionerHeader({ strTrained, practitioner, poppedPractitioner, setP
verticalAlign: 'middle',
justifyContent: 'center',
alignItems: 'center',
bgcolor: {
xs: 'primary.main',
md: 'primary.lightGray',
},
bgcolor: 'primary.lightGray',
}}
>
<PersonIcon
sx={{
display: {
xs: 'inherit',
md: 'none',
},
color: 'primary.lightBlue',
}}
/>
</StyledBox>

{/* Title and info icon container */}
Expand Down Expand Up @@ -192,21 +180,21 @@ function PractitionerHeader({ strTrained, practitioner, poppedPractitioner, setP
href={`/practitioner/${practitioner.airtableRecId}`}
target="_blank"
rel="noopener noreferrer"
startIcon={<PersonIcon />}
startIcon={<PersonIcon sx={{ mr: '-12px' }}/>}
variant="contained"
sx={{
bgcolor: 'primary.midBlue',
color: 'primary.white',
textTransform: 'none',
borderRadius: 2,
width: '100%',
gap: '12px',
'&:hover': {
bgcolor: 'primary.main',
},
}}
>
<Typography sx={{ display: { xs: 'none', md: 'inherit' }, fontSize: '.875rem' }}>View Full Profile</Typography>
<Typography sx={{ display: { xs: 'inherit', md: 'none' }, fontSize: '.875rem' }}>View Profile</Typography>
</Button>
</Box>
</HeaderBox>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Section.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function Section({
key={id}
sx={{ mb: 2 }}
>
<Box sx={{ minHeight: '40px', mt: '5px', mb: '5px' }}>
<Box sx={{ minHeight: { xs: '60px', md: '40px' }, mt: '5px', mb: '5px' }}>
<Typography variant="body1">{header}</Typography>
</Box>

Expand Down
2 changes: 1 addition & 1 deletion src/pages/LandingPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ export default function LandingPage() {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
mb: 3,
mb: 4,
gap: 1,
flexDirection: {
xs: 'column',
Expand Down

0 comments on commit 3153437

Please sign in to comment.