@campxdev/shared 1.11.52 → 1.11.54

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.11.52",
3
+ "version": "1.11.54",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -10,7 +10,7 @@ type FormQuotaSelectorProps = {
10
10
  multiple?: boolean
11
11
  allowAll?: boolean
12
12
  onChange?: (value: any) => void
13
- filters?: { courseId: number }
13
+ filters?: { courseId: number | string }
14
14
  api?: string
15
15
  } & BaseSelectProps
16
16
  export default function FormQuotaSelector(props: FormQuotaSelectorProps) {
@@ -6,6 +6,7 @@ interface SwicthButtonProps {
6
6
  checked: boolean
7
7
  onChange: (v: any) => void
8
8
  subtitle?: ReactNode
9
+ disabled?: boolean
9
10
  }
10
11
 
11
12
  export default function SwitchButton({
@@ -13,13 +14,17 @@ export default function SwitchButton({
13
14
  checked,
14
15
  onChange,
15
16
  subtitle,
17
+ disabled,
16
18
  }: SwicthButtonProps) {
17
19
  return (
18
20
  <StyledBox>
19
21
  <Box sx={{ display: 'flex', alignItems: 'center', gap: '1rem' }}>
20
- <Typography variant="body1">{label}</Typography>
22
+ <Typography variant="body1" color={disabled ? 'grey' : 'black'}>
23
+ {label}
24
+ </Typography>
21
25
  <Switch
22
26
  checked={checked}
27
+ disabled={disabled}
23
28
  onChange={(e, checked) => onChange(checked)}
24
29
  />
25
30
  </Box>