@campxdev/shared 1.9.2 → 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/shared",
3
- "version": "1.9.2",
3
+ "version": "1.9.3",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -1,4 +1,4 @@
1
- import { Box, Stack, Typography, styled } from '@mui/material'
1
+ import { Box, Typography, styled } from '@mui/material'
2
2
  import { InsititutionsStore } from '../../shared-state/InstitutionsStore'
3
3
  import Image from '../Image/Image'
4
4
 
@@ -6,13 +6,7 @@ export default function InsititutionsDialog({ close }) {
6
6
  const { institutions } = InsititutionsStore.useState((s) => s)
7
7
 
8
8
  return (
9
- <Stack
10
- gap={4}
11
- sx={{
12
- padding: '20px',
13
- alignItems: 'center',
14
- }}
15
- >
9
+ <Box sx={{ padding: '20px' }}>
16
10
  <Typography variant="h3" textAlign={'center'}>
17
11
  Select an Instituition
18
12
  </Typography>
@@ -22,7 +16,7 @@ export default function InsititutionsDialog({ close }) {
22
16
  <InstitutionCard institution={item} key={index} />
23
17
  ))}
24
18
  </StyledInstitutionContainer>
25
- </Stack>
19
+ </Box>
26
20
  )
27
21
  }
28
22
 
@@ -36,39 +30,37 @@ const InstitutionCard = ({ institution }) => {
36
30
  }
37
31
 
38
32
  return (
39
- <Box
40
- sx={{
41
- display: 'flex',
42
- flexDirection: 'column',
43
- alignItems: 'center',
44
- gap: '20px',
45
- padding: '14px',
46
- border: '1px solid black',
47
- borderRadius: '10px',
48
- cursor: 'pointer',
49
- width: '200px',
50
- flexShrink: 0,
51
- }}
52
- onClick={handleClick}
53
- >
33
+ <StyledInstitutionCard onClick={handleClick}>
54
34
  <Image
55
35
  alt="logo"
56
- height={100}
57
- width="auto"
36
+ height={'100px'}
37
+ width="100%"
58
38
  src={institution?.images?.url}
59
39
  />
60
40
  <Typography variant="body2">{institution?.name}</Typography>
61
- </Box>
41
+ </StyledInstitutionCard>
62
42
  )
63
43
  }
64
44
 
45
+ const StyledInstitutionCard = styled(Box)(({ theme }) => ({
46
+ display: 'flex',
47
+ flexDirection: 'column',
48
+ alignItems: 'center',
49
+ gap: '20px',
50
+ padding: '14px',
51
+ border: '1px solid black',
52
+ borderRadius: '10px',
53
+ cursor: 'pointer',
54
+ width: '200px',
55
+ flexShrink: 0,
56
+ }))
57
+
65
58
  export const StyledInstitutionContainer = styled(Box)(({ theme }) => ({
66
- width: '87%',
67
- overflowX: 'auto',
59
+ marginTop: '20px',
68
60
  display: 'flex',
69
- flex: 1,
70
- justifyContent: 'flex-start',
61
+ justifyContent: 'center',
71
62
  padding: '20px',
63
+ flexWrap: 'wrap',
72
64
  gap: '20px',
73
65
  '&::-webkit-scrollbar': {
74
66
  width: '0.5em',
@@ -113,6 +113,7 @@ function handleInstitutions(institutions) {
113
113
  dialogProps: {
114
114
  disableEscapeKeyDown: true,
115
115
  onClose: () => {},
116
+ maxWidth: 'md',
116
117
  },
117
118
  })
118
119
  }