mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: adapts react markdown to open links in new tab (#5762)
Adapts our current implementations of `ReactMarkdown` to always open markdown links in new tabs.
This commit is contained in:
parent
77074a26de
commit
ab139553c5
@ -84,7 +84,7 @@ export const Banner = ({ banner, inline, maxHeight }: IBannerProps) => {
|
|||||||
<StyledIcon variant={variant}>
|
<StyledIcon variant={variant}>
|
||||||
<BannerIcon icon={icon} variant={variant} />
|
<BannerIcon icon={icon} variant={variant} />
|
||||||
</StyledIcon>
|
</StyledIcon>
|
||||||
<ReactMarkdown>{message}</ReactMarkdown>
|
<ReactMarkdown linkTarget='_blank'>{message}</ReactMarkdown>
|
||||||
<BannerButton
|
<BannerButton
|
||||||
link={link}
|
link={link}
|
||||||
plausibleEvent={plausibleEvent}
|
plausibleEvent={plausibleEvent}
|
||||||
|
@ -30,7 +30,9 @@ export const BannerDialog = ({
|
|||||||
setOpen(false);
|
setOpen(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<StyledReactMarkdown>{children}</StyledReactMarkdown>
|
<StyledReactMarkdown linkTarget='_blank'>
|
||||||
|
{children}
|
||||||
|
</StyledReactMarkdown>
|
||||||
</Dialogue>
|
</Dialogue>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,9 @@ export const IntegrationHowToSection: VFC<IIntegrationHowToSectionProps> = ({
|
|||||||
>
|
>
|
||||||
<IntegrationIcon name={provider.name} /> {title}
|
<IntegrationIcon name={provider.name} /> {title}
|
||||||
</Typography>
|
</Typography>
|
||||||
<ReactMarkdown>{provider!.howTo || ''}</ReactMarkdown>
|
<ReactMarkdown linkTarget='_blank'>
|
||||||
|
{provider!.howTo || ''}
|
||||||
|
</ReactMarkdown>
|
||||||
</StyledHowDoesItWorkSection>
|
</StyledHowDoesItWorkSection>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user