aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms/links/sharing-link.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/atoms/links/sharing-link.tsx')
-rw-r--r--src/components/atoms/links/sharing-link.tsx47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/components/atoms/links/sharing-link.tsx b/src/components/atoms/links/sharing-link.tsx
deleted file mode 100644
index 0b9d5fb..0000000
--- a/src/components/atoms/links/sharing-link.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import { FC } from 'react';
-import { useIntl } from 'react-intl';
-import styles from './sharing-link.module.scss';
-
-export type SharingMedium =
- | 'diaspora'
- | 'email'
- | 'facebook'
- | 'journal-du-hacker'
- | 'linkedin'
- | 'twitter';
-
-export type SharingLinkProps = {
- /**
- * The sharing medium id.
- */
- medium: SharingMedium;
- /**
- * The sharing url.
- */
- url: string;
-};
-
-/**
- * SharingLink component
- *
- * Render a sharing link.
- */
-export const SharingLink: FC<SharingLinkProps> = ({ medium, url }) => {
- const intl = useIntl();
- const text = intl.formatMessage(
- {
- defaultMessage: 'Share on {name}',
- description: 'Sharing: share on social network text',
- id: 'ureXFw',
- },
- { name: medium }
- );
- const mediumClass = `link--${medium}`;
- const linkClass = `${styles.link} ${styles[mediumClass]}`;
-
- return (
- <a className={linkClass} href={url}>
- <span className="screen-reader-text">{text}</span>
- </a>
- );
-};