-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from codeskills-dev/feat/generic
feat(repo): rewrite to generic jsx
- Loading branch information
Showing
14 changed files
with
62 additions
and
861 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"md-to-react-email": major | ||
--- | ||
|
||
Rename exports to be generic | ||
|
||
### Removed | ||
|
||
- remove `data-id` attributes from components, utils and types | ||
- `react-email` peer and dev dependency |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 3 additions & 5 deletions
8
__tests__/reactEmailMarkdown.test.tsx → __tests__/emailMarkdown.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
import React from "react"; | ||
import { render } from "@react-email/render"; | ||
import { ReactEmailMarkdown } from "../src"; | ||
import { EmailMarkdown } from "../src"; | ||
|
||
describe("ReactEmailMarkdown component renders correctly", () => { | ||
it("renders the markdown in the correct format for browsers", () => { | ||
const actualOutput = render( | ||
<ReactEmailMarkdown markdown={`# Hello, World!`} /> | ||
); | ||
const actualOutput = render(<EmailMarkdown markdown={`# Hello, World!`} />); | ||
expect(actualOutput).toMatchInlineSnapshot( | ||
`"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><div><h1 style="font-weight:500;padding-top:20px;font-size:2.5rem" data-id="react-email-heading">Hello, World!</h1></div>"` | ||
`"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><div><h1 style="font-weight:500;padding-top:20px;font-size:2.5rem">Hello, World!</h1></div>"` | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.