feat(Editor): show webhook info in test substep

This commit is contained in:
Ali BARIN
2022-12-07 23:42:01 +01:00
parent 3c62f182ab
commit 346a706e41
8 changed files with 81 additions and 12 deletions

View File

@@ -0,0 +1,44 @@
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import Typography from '@mui/material/Typography';
import { generateExternalLink } from '../../helpers/translation-values';
import { WEBHOOK_DOCS } from '../../config/urls';
import TextField from '../TextField';
import { Alert } from './style';
type WebhookUrlInfoProps = {
webhookUrl: string;
};
function WebhookUrlInfo(props: WebhookUrlInfoProps): React.ReactElement {
const { webhookUrl } = props;
return (
<Alert icon={false} color="info">
<Typography variant="body2" textAlign="center">
<FormattedMessage id="webhookUrlInfo.title" />
</Typography>
<Typography variant="body1" textAlign="center">
<FormattedMessage id="webhookUrlInfo.description" />
</Typography>
<TextField
readOnly
clickToCopy={true}
name="webhookUrl"
fullWidth
defaultValue={webhookUrl}
helperText={
<FormattedMessage
id="webhookUrlInfo.helperText"
values={{ link: generateExternalLink(WEBHOOK_DOCS) }}
/>
}
/>
</Alert>
);
}
export default WebhookUrlInfo;