create-mikstack 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mikstack",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,4 +1,4 @@
1
- import { html, body, section, text, button, link, divider, render } from "@mikstack/email";
1
+ import { html, body, section, text, button, render } from "@mikstack/email";
2
2
 
3
3
  export function magicLinkEmail(url: string) {
4
4
  const email = html(
@@ -13,11 +13,14 @@ export function magicLinkEmail(url: string) {
13
13
  marginBottom: 40,
14
14
  marginTop: 40,
15
15
  }),
16
- link("Click here to sign in with this magic link", {
16
+ button("Sign in", {
17
17
  href: url,
18
- color: "#2563eb",
18
+ backgroundColor: "#111827",
19
+ color: "#ffffff",
19
20
  fontSize: 14,
20
- textDecoration: "underline",
21
+ fontWeight: "bold",
22
+ padding: [12, 34],
23
+ borderRadius: 6,
21
24
  marginBottom: 16,
22
25
  }),
23
26
  text("Or, copy and paste this temporary login URL:", {
@@ -23,8 +23,8 @@ export const GET: RequestHandler = async ({ params }) => {
23
23
 
24
24
  const wrapper = `<!DOCTYPE html>
25
25
  <html>
26
- <head><meta charset="utf-8">${title}<style>*{margin:0;padding:0}html,body{height:100%;background:#e5e7eb}iframe{display:block;max-width:600px;width:100%;height:100%;margin:0 auto;border:none;background:#fff}</style></head>
27
- <body><iframe srcdoc="${escaped}"></iframe></body>
26
+ <head><meta charset="utf-8">${title}<style>*{margin:0;padding:0}html,body{background:#e5e7eb}iframe{display:block;max-width:600px;width:100%;margin:24px auto;border:none;background:#fff}</style></head>
27
+ <body><iframe srcdoc="${escaped}" onload="this.style.height=this.contentDocument.documentElement.scrollHeight+'px'"></iframe></body>
28
28
  </html>`;
29
29
 
30
30
  return new Response(wrapper, {