Got rid of button overrides and made a variant for text button.
This commit is contained in:
1 parent
5e730acd47
commit
4736f4f301
2 files changed
+27
-25
No files matched your search
@@ -56,27 +56,6 @@ const NotificationIntegrationModal = ({
|
|||||||
webhook: monitor?.notifications?.some(n => n.type === "webhook") || false,
|
webhook: monitor?.notifications?.some(n => n.type === "webhook") || false,
|
||||||
webhookUrl: monitor?.notifications?.find(n => n.type === "webhook")?.url || "",
|
webhookUrl: monitor?.notifications?.find(n => n.type === "webhook")?.url || "",
|
||||||
});
|
});
|
||||||
|
|
||||||
const testNotificationButtonStyle = {
|
|
||||||
textDecoration: 'underline',
|
|
||||||
color: '#344054',
|
|
||||||
textTransform: 'none',
|
|
||||||
padding: '0 !important',
|
|
||||||
margin: 0,
|
|
||||||
fontSize: '0.9rem',
|
|
||||||
fontWeight: 'normal',
|
|
||||||
backgroundColor: 'transparent !important',
|
|
||||||
'&:hover': {
|
|
||||||
backgroundColor: 'transparent !important',
|
|
||||||
textDecoration: 'underline'
|
|
||||||
},
|
|
||||||
'&.Mui-disabled': {
|
|
||||||
backgroundColor: 'transparent !important'
|
|
||||||
},
|
|
||||||
minWidth: '0 !important',
|
|
||||||
boxShadow: 'none !important',
|
|
||||||
border: 'none !important'
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleChangeTab = (event, newValue) => {
|
const handleChangeTab = (event, newValue) => {
|
||||||
setTabValue(newValue);
|
setTabValue(newValue);
|
||||||
@@ -226,7 +205,6 @@ const NotificationIntegrationModal = ({
|
|||||||
color="info"
|
color="info"
|
||||||
onClick={() => handleTestNotification('slack')}
|
onClick={() => handleTestNotification('slack')}
|
||||||
disabled={!integrations.slack || !integrations.slackWebhook}
|
disabled={!integrations.slack || !integrations.slackWebhook}
|
||||||
sx={testNotificationButtonStyle}
|
|
||||||
>
|
>
|
||||||
Test notification
|
Test notification
|
||||||
</Button>
|
</Button>
|
||||||
@@ -267,7 +245,6 @@ const NotificationIntegrationModal = ({
|
|||||||
color="info"
|
color="info"
|
||||||
onClick={() => handleTestNotification('discord')}
|
onClick={() => handleTestNotification('discord')}
|
||||||
disabled={!integrations.discord || !integrations.discordWebhook}
|
disabled={!integrations.discord || !integrations.discordWebhook}
|
||||||
sx={testNotificationButtonStyle}
|
|
||||||
>
|
>
|
||||||
Test notification
|
Test notification
|
||||||
</Button>
|
</Button>
|
||||||
@@ -320,7 +297,6 @@ const NotificationIntegrationModal = ({
|
|||||||
color="info"
|
color="info"
|
||||||
onClick={() => handleTestNotification('telegram')}
|
onClick={() => handleTestNotification('telegram')}
|
||||||
disabled={!integrations.telegram || !integrations.telegramToken || !integrations.telegramChatId}
|
disabled={!integrations.telegram || !integrations.telegramToken || !integrations.telegramChatId}
|
||||||
sx={testNotificationButtonStyle}
|
|
||||||
>
|
>
|
||||||
Test notification
|
Test notification
|
||||||
</Button>
|
</Button>
|
||||||
@@ -361,7 +337,6 @@ const NotificationIntegrationModal = ({
|
|||||||
color="info"
|
color="info"
|
||||||
onClick={() => handleTestNotification('webhook')}
|
onClick={() => handleTestNotification('webhook')}
|
||||||
disabled={!integrations.webhook || !integrations.webhookUrl}
|
disabled={!integrations.webhook || !integrations.webhookUrl}
|
||||||
sx={testNotificationButtonStyle}
|
|
||||||
>
|
>
|
||||||
Test notification
|
Test notification
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -117,6 +117,33 @@ const baseTheme = (palette) => ({
|
|||||||
color: `${theme.palette.secondary.contrastText} !important`,
|
color: `${theme.palette.secondary.contrastText} !important`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
props: { variant: 'text', color: 'info' },
|
||||||
|
style: {
|
||||||
|
textDecoration: 'underline',
|
||||||
|
color: '#344054',
|
||||||
|
padding: 0,
|
||||||
|
margin: 0,
|
||||||
|
fontSize: '0.9rem',
|
||||||
|
fontWeight: 'normal',
|
||||||
|
backgroundColor: 'transparent',
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: 'transparent',
|
||||||
|
textDecoration: 'underline'
|
||||||
|
},
|
||||||
|
"&.Mui-disabled": {
|
||||||
|
backgroundColor: theme.palette.secondary.main,
|
||||||
|
color: theme.palette.primary.contrastText,
|
||||||
|
"&.MuiButton-text": {
|
||||||
|
backgroundColor: 'transparent'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
minWidth: 0,
|
||||||
|
boxShadow: 'none',
|
||||||
|
border: 'none'
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
height: 34,
|
height: 34,
|
||||||
fontWeight: 400,
|
fontWeight: 400,
|
||||||
|
|||||||
Reference in new issue
Block a user