/** * External dependencies */ import { __ } from '@wordpress/i18n'; import { Icon, external } from '@wordpress/icons'; import { VisuallyHidden } from '@wordpress/components'; import { sanitizeHTML } from '@woocommerce/utils'; import { Alert } from '@woocommerce/icons'; /** * Internal dependencies */ import './editor.scss'; export interface ExternalLinkCardProps { href: string; title: string; description?: string; warning?: string; } /** * Show a link that displays a title, description, and an icon showing that the link is external. * Links are opened in a new tab. */ const ExternalLinkCard = ( { href, title, description, warning, }: ExternalLinkCardProps ): JSX.Element => { return ( { title } { description && ( ) } { warning ? ( } /> { warning } ) : null } { /* translators: accessibility text */ __( '(opens in a new tab)', 'woocommerce' ) } ); }; export default ExternalLinkCard;