refactored all the hardcoded absolute dimension values and made them into relative values that reference the theme.
This commit is contained in:
1 parent
2a54d2ce16
commit
25ff7abe7f
1 file changed
+26
-9
@@ -175,24 +175,30 @@ const NotificationIntegrationModal = ({
|
|||||||
maxWidth="md"
|
maxWidth="md"
|
||||||
sx={{
|
sx={{
|
||||||
'& .MuiDialog-paper': {
|
'& .MuiDialog-paper': {
|
||||||
maxWidth: '775px'
|
width: `calc(90% - ${theme.spacing(40)})`,
|
||||||
|
maxWidth: theme.breakpoints.values.md
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<Box sx={{ display: 'flex', height: '300px' }}>
|
<Box sx={{
|
||||||
|
display: 'flex',
|
||||||
|
height: `calc(26vh - ${theme.spacing(20)})`
|
||||||
|
}}>
|
||||||
{/* Left sidebar with tabs */}
|
{/* Left sidebar with tabs */}
|
||||||
<Box sx={{
|
<Box sx={{
|
||||||
borderRight: 1,
|
borderRight: 1,
|
||||||
borderColor: 'divider',
|
borderColor: theme.palette.primary.lowContrast,
|
||||||
minWidth: '200px',
|
width: '30%',
|
||||||
|
maxWidth: theme.spacing(120),
|
||||||
pr: theme.spacing(10)
|
pr: theme.spacing(10)
|
||||||
}}>
|
}}>
|
||||||
<Typography variant="subtitle1" sx={{
|
<Typography variant="subtitle1" sx={{
|
||||||
my: theme.spacing(1),
|
my: theme.spacing(1),
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
fontSize: '0.9rem',
|
fontSize: theme.typography.fontSize * 0.9,
|
||||||
color: theme.palette.primary.contrastTextSecondary
|
color: theme.palette.primary.contrastTextSecondary,
|
||||||
|
pl: theme.spacing(4)
|
||||||
}}>
|
}}>
|
||||||
Add or edit notifications
|
Add or edit notifications
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -205,13 +211,22 @@ const NotificationIntegrationModal = ({
|
|||||||
aria-label="Notification tabs"
|
aria-label="Notification tabs"
|
||||||
>
|
>
|
||||||
{notificationTypes.map((type) => (
|
{notificationTypes.map((type) => (
|
||||||
<Tab key={type.id} label={type.label} orientation="vertical" />
|
<Tab
|
||||||
|
key={type.id}
|
||||||
|
label={type.label}
|
||||||
|
orientation="vertical"
|
||||||
|
disableRipple
|
||||||
|
/>
|
||||||
))}
|
))}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* Right side content */}
|
{/* Right side content */}
|
||||||
<Box sx={{ flex: 1, pl: theme.spacing(7.5) }}>
|
<Box sx={{
|
||||||
|
flex: 1,
|
||||||
|
pl: theme.spacing(7.5),
|
||||||
|
overflowY: 'auto'
|
||||||
|
}}>
|
||||||
{notificationTypes.map((type, index) => (
|
{notificationTypes.map((type, index) => (
|
||||||
<TabPanel key={type.id} value={tabValue} index={index}>
|
<TabPanel key={type.id} value={tabValue} index={index}>
|
||||||
<TabComponent
|
<TabComponent
|
||||||
@@ -238,7 +253,9 @@ const NotificationIntegrationModal = ({
|
|||||||
color="accent"
|
color="accent"
|
||||||
onClick={handleSave}
|
onClick={handleSave}
|
||||||
sx={{
|
sx={{
|
||||||
width: '120px'
|
width: 'auto',
|
||||||
|
minWidth: theme.spacing(60),
|
||||||
|
px: theme.spacing(8)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Save
|
Save
|
||||||
|
|||||||
Reference in new issue
Block a user