refactor(web): remove typescript
This commit is contained in:
@@ -1,20 +1,12 @@
|
||||
import * as React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import type { AlertProps } from '@mui/material/Alert';
|
||||
|
||||
import { generateExternalLink } from '../../helpers/translationValues';
|
||||
import { WEBHOOK_DOCS } from '../../config/urls';
|
||||
import TextField from '../TextField';
|
||||
import { Alert } from './style';
|
||||
|
||||
type WebhookUrlInfoProps = {
|
||||
webhookUrl: string;
|
||||
} & AlertProps;
|
||||
|
||||
function WebhookUrlInfo(props: WebhookUrlInfoProps): React.ReactElement {
|
||||
function WebhookUrlInfo(props) {
|
||||
const { webhookUrl, ...alertProps } = props;
|
||||
|
||||
return (
|
||||
<Alert icon={false} color="info" {...alertProps}>
|
||||
<Typography variant="body2" textAlign="center">
|
||||
@@ -41,5 +33,4 @@ function WebhookUrlInfo(props: WebhookUrlInfoProps): React.ReactElement {
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
|
||||
export default WebhookUrlInfo;
|
@@ -1,14 +1,13 @@
|
||||
import { styled } from '@mui/material/styles';
|
||||
import MuiAlert, { alertClasses } from '@mui/material/Alert';
|
||||
|
||||
export const Alert = styled(MuiAlert)(() => ({
|
||||
[`&.${alertClasses.root}`]: {
|
||||
fontWeight: 300,
|
||||
width: '100%',
|
||||
display: 'flex',
|
||||
flexDirection: 'column'
|
||||
flexDirection: 'column',
|
||||
},
|
||||
[`& .${alertClasses.message}`]: {
|
||||
width: '100%'
|
||||
}
|
||||
width: '100%',
|
||||
},
|
||||
}));
|
Reference in New Issue
Block a user