feat: Render diffs in email notifications (#4164)
* deps * diffCompact * Diffs in email * test * fix: Fade deleted images fix: Don't include empty paragraphs as context fix: Allow for same image multiple times and refactor * Remove target _blank * fix: Table heading incorrect color
This commit is contained in:
25
server/emails/templates/components/Diff.tsx
Normal file
25
server/emails/templates/components/Diff.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import * as React from "react";
|
||||
import theme from "@shared/styles/theme";
|
||||
|
||||
type Props = {
|
||||
children: React.ReactNode;
|
||||
href?: string;
|
||||
};
|
||||
|
||||
export default ({ children, ...rest }: Props) => {
|
||||
const style = {
|
||||
borderRadius: "4px",
|
||||
background: theme.secondaryBackground,
|
||||
padding: ".75em 1em",
|
||||
color: theme.text,
|
||||
display: "block",
|
||||
textDecoration: "none",
|
||||
width: "100%",
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={style} className="content-diff" {...rest}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user