diff --git a/apps/demo/emails/airbnb-review.tsx b/apps/demo/emails/airbnb-review.tsx index 3b86e428..2f0e873b 100644 --- a/apps/demo/emails/airbnb-review.tsx +++ b/apps/demo/emails/airbnb-review.tsx @@ -11,7 +11,7 @@ import { Row, Section, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; interface AirbnbReviewEmailProps { diff --git a/apps/demo/emails/amazon-review.tsx b/apps/demo/emails/amazon-review.tsx index b2530d6f..b4b79652 100644 --- a/apps/demo/emails/amazon-review.tsx +++ b/apps/demo/emails/amazon-review.tsx @@ -11,7 +11,7 @@ import { Row, Section, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; interface AmazonReviewEmailProps { diff --git a/apps/demo/emails/apple-receipt.tsx b/apps/demo/emails/apple-receipt.tsx index db70b011..1484932e 100644 --- a/apps/demo/emails/apple-receipt.tsx +++ b/apps/demo/emails/apple-receipt.tsx @@ -11,7 +11,7 @@ import { Row, Section, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; const baseUrl = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : ''; diff --git a/apps/demo/emails/codepen-challengers.tsx b/apps/demo/emails/codepen-challengers.tsx index 5ac0cc54..1adbf5e5 100644 --- a/apps/demo/emails/codepen-challengers.tsx +++ b/apps/demo/emails/codepen-challengers.tsx @@ -12,7 +12,7 @@ import { Section, Text, Row -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; const baseUrl = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : ''; diff --git a/apps/demo/emails/dropbox-reset-password.tsx b/apps/demo/emails/dropbox-reset-password.tsx index dd0bbcf9..f3638c5e 100644 --- a/apps/demo/emails/dropbox-reset-password.tsx +++ b/apps/demo/emails/dropbox-reset-password.tsx @@ -9,7 +9,7 @@ import { Preview, Section, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; interface DropboxResetPasswordEmailProps { diff --git a/apps/demo/emails/github-access-token.tsx b/apps/demo/emails/github-access-token.tsx index 7ae02485..433f2250 100644 --- a/apps/demo/emails/github-access-token.tsx +++ b/apps/demo/emails/github-access-token.tsx @@ -9,7 +9,7 @@ import { Preview, Section, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; interface GithubAccessTokenEmailProps { diff --git a/apps/demo/emails/google-play-policy-update.tsx b/apps/demo/emails/google-play-policy-update.tsx index a5b80a0f..cd53d2b8 100644 --- a/apps/demo/emails/google-play-policy-update.tsx +++ b/apps/demo/emails/google-play-policy-update.tsx @@ -11,7 +11,7 @@ import { Row, Section, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; const baseUrl = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : ''; diff --git a/apps/demo/emails/koala-welcome.tsx b/apps/demo/emails/koala-welcome.tsx index 4f3f3cf6..e2ca638e 100644 --- a/apps/demo/emails/koala-welcome.tsx +++ b/apps/demo/emails/koala-welcome.tsx @@ -9,7 +9,7 @@ import { Preview, Section, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; interface KoalaWelcomeEmailProps { diff --git a/apps/demo/emails/linear-login-code.tsx b/apps/demo/emails/linear-login-code.tsx index 7072e6ea..48f98970 100644 --- a/apps/demo/emails/linear-login-code.tsx +++ b/apps/demo/emails/linear-login-code.tsx @@ -11,7 +11,7 @@ import { Preview, Section, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; interface LinearLoginCodeEmailProps { diff --git a/apps/demo/emails/netlify-welcome.tsx b/apps/demo/emails/netlify-welcome.tsx index 5f2f7e8e..0876afab 100644 --- a/apps/demo/emails/netlify-welcome.tsx +++ b/apps/demo/emails/netlify-welcome.tsx @@ -13,7 +13,7 @@ import { Section, Tailwind, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; interface NetlifyWelcomeEmailProps { diff --git a/apps/demo/emails/nike-receipt.tsx b/apps/demo/emails/nike-receipt.tsx index 8779bac4..da7fb318 100644 --- a/apps/demo/emails/nike-receipt.tsx +++ b/apps/demo/emails/nike-receipt.tsx @@ -12,7 +12,7 @@ import { Row, Section, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; const baseUrl = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : ''; diff --git a/apps/demo/emails/notion-magic-link.tsx b/apps/demo/emails/notion-magic-link.tsx index 4981880e..0326ef6e 100644 --- a/apps/demo/emails/notion-magic-link.tsx +++ b/apps/demo/emails/notion-magic-link.tsx @@ -1,14 +1,4 @@ -import { - Body, - Container, - Head, - Heading, - Html, - Img, - Link, - Preview, - Text -} from '@jsx-email/components'; +import { Body, Container, Head, Heading, Html, Img, Link, Preview, Text } from '@jsx-email/all'; import * as React from 'react'; interface NotionMagicLinkEmailProps { diff --git a/apps/demo/emails/plaid-verify-identity.tsx b/apps/demo/emails/plaid-verify-identity.tsx index 3076e7d7..acfb4105 100644 --- a/apps/demo/emails/plaid-verify-identity.tsx +++ b/apps/demo/emails/plaid-verify-identity.tsx @@ -1,14 +1,4 @@ -import { - Body, - Container, - Head, - Heading, - Html, - Img, - Link, - Section, - Text -} from '@jsx-email/components'; +import { Body, Container, Head, Heading, Html, Img, Link, Section, Text } from '@jsx-email/all'; import * as React from 'react'; interface PlaidVerifyIdentityEmailProps { diff --git a/apps/demo/emails/raycast-magic-link.tsx b/apps/demo/emails/raycast-magic-link.tsx index e6167000..c30043ce 100644 --- a/apps/demo/emails/raycast-magic-link.tsx +++ b/apps/demo/emails/raycast-magic-link.tsx @@ -10,7 +10,7 @@ import { Preview, Section, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; interface RaycastMagicLinkEmailProps { diff --git a/apps/demo/emails/slack-confirm.tsx b/apps/demo/emails/slack-confirm.tsx index 0fc0e6a0..88980d0e 100644 --- a/apps/demo/emails/slack-confirm.tsx +++ b/apps/demo/emails/slack-confirm.tsx @@ -11,7 +11,7 @@ import { Row, Section, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; interface SlackConfirmEmailProps { diff --git a/apps/demo/emails/stack-overflow-tips.tsx b/apps/demo/emails/stack-overflow-tips.tsx index a2c39d89..d395e61e 100644 --- a/apps/demo/emails/stack-overflow-tips.tsx +++ b/apps/demo/emails/stack-overflow-tips.tsx @@ -12,7 +12,7 @@ import { Section, Text, Row -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; interface StackOverflowTipsEmailProps { diff --git a/apps/demo/emails/stripe-welcome.tsx b/apps/demo/emails/stripe-welcome.tsx index b6cbed78..34c08dd9 100644 --- a/apps/demo/emails/stripe-welcome.tsx +++ b/apps/demo/emails/stripe-welcome.tsx @@ -10,7 +10,7 @@ import { Preview, Section, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; const baseUrl = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : ''; diff --git a/apps/demo/emails/twitch-reset-password.tsx b/apps/demo/emails/twitch-reset-password.tsx index 9a2158ca..67a667a5 100644 --- a/apps/demo/emails/twitch-reset-password.tsx +++ b/apps/demo/emails/twitch-reset-password.tsx @@ -10,7 +10,7 @@ import { Row, Section, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; interface TwitchResetPasswordEmailProps { diff --git a/apps/demo/emails/vercel-invite-user.tsx b/apps/demo/emails/vercel-invite-user.tsx index 32b40f6d..a0804def 100644 --- a/apps/demo/emails/vercel-invite-user.tsx +++ b/apps/demo/emails/vercel-invite-user.tsx @@ -14,7 +14,7 @@ import { Section, Tailwind, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; interface VercelInviteUserEmailProps { diff --git a/apps/demo/emails/yelp-recent-login.tsx b/apps/demo/emails/yelp-recent-login.tsx index aab5d08d..b1e2912f 100644 --- a/apps/demo/emails/yelp-recent-login.tsx +++ b/apps/demo/emails/yelp-recent-login.tsx @@ -11,7 +11,7 @@ import { Row, Section, Text -} from '@jsx-email/components'; +} from '@jsx-email/all'; import * as React from 'react'; interface YelpRecentLoginEmailProps { diff --git a/packages/body/src/body.tsx b/packages/body/src/body.tsx index 8ce4b7e0..3daa66cd 100644 --- a/packages/body/src/body.tsx +++ b/packages/body/src/body.tsx @@ -1,4 +1,4 @@ -import * as React from 'react'; +import type React from 'react'; type RootProps = React.ComponentPropsWithoutRef<'body'>; diff --git a/packages/button/src/button.tsx b/packages/button/src/button.tsx index 9cae5500..9e2de112 100644 --- a/packages/button/src/button.tsx +++ b/packages/button/src/button.tsx @@ -1,8 +1,7 @@ -import * as React from 'react'; +import type React from 'react'; import { pxToPt, parsePadding } from './utils'; -type ButtonElement = React.ElementRef<'a'>; type RootProps = React.ComponentPropsWithoutRef<'a'>; export interface ButtonProps extends RootProps { @@ -40,40 +39,38 @@ const buttonTextStyle = (pb?: number) => { }; }; -export const Button = React.forwardRef>( - ({ children, style, target = '_blank', ...props }, forwardedRef) => { - const { pt, pr, pb, pl } = parsePadding({ - padding: style?.padding, - paddingBottom: style?.paddingBottom, - paddingLeft: style?.paddingLeft, - paddingRight: style?.paddingRight, - paddingTop: style?.paddingTop - }); +export const Button: React.FC> = ({ + children, + style, + target = '_blank', + ...props +}) => { + const { pt, pr, pb, pl } = parsePadding({ + padding: style?.padding, + paddingBottom: style?.paddingBottom, + paddingLeft: style?.paddingLeft, + paddingRight: style?.paddingRight, + paddingTop: style?.paddingTop + }); - const y = pt + pb; - const textRaise = pxToPt(y); + const y = pt + pb; + const textRaise = pxToPt(y); - return ( - - ` - }} - /> - {children} - ` - }} - /> - - ); - } -); + return ( + + ` + }} + /> + {children} + ` + }} + /> + + ); +}; Button.displayName = 'Button'; diff --git a/packages/cli/app/src/css/globals.css b/packages/cli/app/src/css/globals.css index ac98e5e4..e716e454 100644 --- a/packages/cli/app/src/css/globals.css +++ b/packages/cli/app/src/css/globals.css @@ -1,13 +1,23 @@ @import url(https://fonts.bunny.net/css?family=andika:400,400i,700,700i|inter:400,600|montserrat:100,200,300,400,500,600); -@import './monokai4.css'; @tailwind base; @tailwind components; @tailwind utilities; @layer base { - html, body { - font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; + html, + body { + font-family: + 'Montserrat', + -apple-system, + BlinkMacSystemFont, + 'Segoe UI', + Helvetica, + Arial, + sans-serif, + 'Apple Color Emoji', + 'Segoe UI Emoji', + 'Segoe UI Symbol'; } .shiki { @@ -27,11 +37,13 @@ white-space: pre; } - .shiki .line:last-child:before, .shiki .line:last-child span { + .shiki .line:last-child:before, + .shiki .line:last-child span { padding-bottom: 30px; } - .shiki .line:first-child:before, .shiki .line:first-child span { + .shiki .line:first-child:before, + .shiki .line:first-child span { padding-top: 10px; } diff --git a/packages/column/src/column.tsx b/packages/column/src/column.tsx index 7ff5db9d..9cb8d74c 100644 --- a/packages/column/src/column.tsx +++ b/packages/column/src/column.tsx @@ -1,16 +1,17 @@ -import * as React from 'react'; +import type React from 'react'; -type ColumnElement = React.ElementRef<'td'>; type RootProps = React.ComponentPropsWithoutRef<'td'>; export interface ColumnProps extends RootProps {} -export const Column = React.forwardRef>( - ({ children, style, ...props }, forwardedRef) => ( - - {children} - - ) +export const Column = ({ + children, + style, + ...props +}: React.PropsWithChildren>) => ( + + {children} + ); Column.displayName = 'Column'; diff --git a/packages/container/src/container.tsx b/packages/container/src/container.tsx index f75a860b..02d8c8eb 100644 --- a/packages/container/src/container.tsx +++ b/packages/container/src/container.tsx @@ -1,31 +1,27 @@ -import * as React from 'react'; +import type React from 'react'; -type ContainerElement = React.ElementRef<'table'>; type RootProps = React.ComponentPropsWithoutRef<'table'>; export interface ContainerProps extends RootProps {} -export const Container = React.forwardRef>( - ({ children, style, ...props }, forwardedRef) => ( - - - - - - -
{children}
- ) +export const Container: React.FC> = ({ children, style, ...props }) => ( + + + + + + +
{children}
); Container.displayName = 'Container'; diff --git a/packages/font/src/font.tsx b/packages/font/src/font.tsx index 5d4ac9e7..8ae7cd3f 100644 --- a/packages/font/src/font.tsx +++ b/packages/font/src/font.tsx @@ -1,4 +1,4 @@ -import * as React from 'react'; +import type React from 'react'; type FallbackFont = 'Arial' | 'Helvetica' | 'Verdana' | 'Georgia' | 'Times New Roman'; @@ -46,8 +46,8 @@ export const Font: React.FC> = ({ * { font-family: '${fontFamily}', ${ - Array.isArray(fallbackFontFamily) ? fallbackFontFamily.join(', ') : fallbackFontFamily - }; + Array.isArray(fallbackFontFamily) ? fallbackFontFamily.join(', ') : fallbackFontFamily + }; } `; return