This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
outline/server/emails/components/Footer.js
Tom Moor 9ca0038d39 Fixes: Collection creation notification email
Added: Unsubscribe option to notification email footers
Added: Two new notification types (emails not written yet)
Fixed: Validation added to notification setting events
2018-12-05 23:44:41 -08:00

67 lines
1.5 KiB
JavaScript

// @flow
import * as React from 'react';
import { Table, TBody, TR, TD } from 'oy-vey';
import { twitterUrl, spectrumUrl } from '../../../shared/utils/routeHelpers';
import theme from '../../../shared/styles/theme';
type Props = {
unsubscribeUrl?: string,
};
export default ({ unsubscribeUrl }: Props) => {
const footerStyle = {
padding: '20px 0',
borderTop: `1px solid ${theme.smokeDark}`,
color: theme.slate,
fontSize: '14px',
};
const unsubStyle = {
padding: '0',
color: theme.slate,
fontSize: '14px',
};
const linkStyle = {
color: theme.slate,
fontWeight: 500,
textDecoration: 'none',
marginRight: '10px',
};
const externalLinkStyle = {
color: theme.slate,
textDecoration: 'none',
margin: '0 10px',
};
return (
<Table width="100%">
<TBody>
<TR>
<TD style={footerStyle}>
<a href={process.env.URL} style={linkStyle}>
Outline
</a>
<a href={twitterUrl()} style={externalLinkStyle}>
Twitter
</a>
<a href={spectrumUrl()} style={externalLinkStyle}>
Spectrum
</a>
</TD>
</TR>
{unsubscribeUrl && (
<TR>
<TD style={unsubStyle}>
<a href={unsubscribeUrl} style={linkStyle}>
Unsubscribe from these emails
</a>
</TD>
</TR>
)}
</TBody>
</Table>
);
};